----- Original Message -----
> Hi Clint and thanks for your advices (sorry about the delayed
> answer),
> 
> On Tue, Jul 19, 2011 at 1:33 AM, [email protected]
> <[email protected]> wrote:
> > When cross compiling, only some the qmake queries are actually
> > used.
> >
> > Finding the rest just works if subdirs in the Qt installation
> > weren't given
> > different values when running Qt's configure script (e.g.
> > --libdir=mylib or
> > --libdir=lib/qt4).
> >
> > So, the root of the Qt installation needs to be given in the
> > toolchain file.
> >  Is /opt/env/lenny-ppc/usr/lib/qt4 the root of the installation, or
> > the
> > location of the libraries?
> 
> > In either case, it won't be searched unless you put that in your
> >toolchain
> > file.  The standard cross compile find variables are the global
> > variables you
> > can setto help find Qt.
> 
> I included /opt/env/lenny-ppc/usr/share/qt4 (which I belive to be the
> root of
> the Qt installation) in CMAKE_FIND_ROOT_PATH but the Qt libraries
> still wasn't
> detected.
> 
> > Then, if you need to help it some more, you may set the path to the
> > QtCore
> > library manually, or other variables manually.
> 
> Managed to compile and link when I added the following snippet to the
> toolchain file:
> 
>     set(QT_HEADERS_DIR /opt/env/lenny-ppc/usr/lib)
>     set(QT_LIBRARY_DIR /opt/env/lenny-ppc/usr/include/qt4)
> 
>     set(QT_QTCORE_LIBRARY /opt/env/lenny-ppc/usr/lib/libQtCore.so)
>     set(QT_QTCORE_LIBRARY_RELEASE
>     /opt/env/lenny-ppc/usr/lib/libQtCore.so)
>     set(QT_QTCORE_INCLUDE_DIR /opt/env/lenny-ppc/usr/include/qt4)
> 
>     set(QT_QTDBUS_LIBRARY /opt/env/lenny-ppc/usr/lib/libQtDBus.so)
>     set(QT_QTDBUS_LIBRARY_RELEASE
>     /opt/env/lenny-ppc/usr/lib/libQtDBus.so)
>     set(QT_QTDBUS_INCLUDE_DIR /opt/env/lenny-ppc/usr/include/qt4)
> 
>     set(QT_QTXML_LIBRARY /opt/env/lenny-ppc/usr/lib/libQtXml.so)
>     set(QT_QTXML_LIBRARY_RELEASE
>     /opt/env/lenny-ppc/usr/lib/libQtXml.so)
>     set(QT_QTXML_INCLUDE_DIR /opt/env/lenny-ppc/usr/include/qt4)
> 
> Would have been nice if I didn't have to set those paths explicitely.
> Will continue the digging.

Does it work if you only specify just this:
    set(QT_HEADERS_DIR /opt/env/lenny-ppc/usr/include/qt4)
    set(QT_QTCORE_LIBRARY_RELEASE  /opt/env/lenny-ppc/usr/lib/libQtCore.so)

And I would have thought it can find QtCore if /opt/env/lenny-ppc/usr was given 
as a find root.
No?

Clint
_______________________________________________
Powered by www.kitware.com

Visit other Kitware open-source projects at 
http://www.kitware.com/opensource/opensource.html

Please keep messages on-topic and check the CMake FAQ at: 
http://www.cmake.org/Wiki/CMake_FAQ

Follow this link to subscribe/unsubscribe:
http://www.cmake.org/mailman/listinfo/cmake

Reply via email to