[CMake] Moving QT getting FIND_PACKAGE( Qt4 ) to work

Christian Ehrlicher Ch.Ehrlicher at gmx.de
Mon Apr 27 13:13:08 EDT 2009


Am Montag 27 April 2009 18:47:07 schrieb Anders Backman:
> Hi all.
> I have a problem where I pack the necessary stuff from qt into a dependency
> zip file (.h, .lib, .dll and qmake.exe).
>
> I have the path to qmake setup, so that qmake can be found.
>
> Then I unpack that to some specified directory and run cmake on my own
> code.
>
> My projectgs CMakeLists.txt call FIND_PACKAGE( Qt4 ) which among other
> things call:
>
> qmake -query QT_INSTALL_LIBS (
>
> Now this returns with the ORIGINAL build directory, not the new one where
> qmake actually exists.
>
> Is there anything one can do to fix this?
> I want CMake to use qmake so that it can locate things in relative to where
> qmake actually is, and not where it was when I built qt.
This is not a cmake problem - you can't move the qt installation around. If 
you want to do this you have to provide a proper qt.conf ( 
http://doc.trolltech.com/4.5/qt-conf.html )

HTH
Christian


More information about the CMake mailing list