[CMake] Windows Qt CMake 2.8 build question

John Drescher drescherjm at gmail.com
Thu Nov 12 12:57:51 EST 2009


On Thu, Nov 12, 2009 at 12:51 PM, Steven Wilson
<steven.wesley.wilson at gmail.com> wrote:
> Caveat:  I am a complete Qt novice.
>
> I'm trying to build the 2.8 CVS branch of CMake on Windows and would like to
> build the Qt GUI.  I downloaded and installed the LGPL/Free Windows Qt SDK
> from the Nokia website.   When I use the CMake 2.6.4 or CMake 2.8.0 RC 7 GUI
> to configure the build for Visual Studio(2008) (with the Qt GUI enabled) I
> get the following error from CMake:
>
> CMake Error at C:/Program Files (x86)/CMake
> 2.8/share/cmake-2.8/Modules/FindQt4.cmake:771 (MESSAGE):
>   It appears you're trying to use Visual Studio with Qt built by mingw
> Call Stack (most recent call first):
>   Source/QtDialog/CMakeLists.txt:14 (FIND_PACKAGE)
>
> The FindQT4.cmake package indicates that it is looking for a qmake.exe
> binary to run to configure the rest of the Qt CMake variables.  I set my
> PATH environment variable to point to C:\Qt\2009.4\qt\bin so that the
> FindQT4.cmake package can find the qmake binary, but it seems to think that
> qmake is for mingw.
>
> I have also tried setting my PATH variable to point to C:\Qt\2009.4\qt\qmake
> so that it can find the qmake in that directory, but using that one gives
> errors about temporary library versions of the Qt library not being
> installed.   The FindQT4.cmake file tries to query the qmake binary for
> QT_INSTALL_LIBS and qt\qmake\qmake.exe from the SDK I installed returns the
> following:
>
> C:/qt-greenhouse/Trolltech/Code_less_create_more/Trolltech/Code_less_create_more
> /Troll/4.5.0/qt/lib
>
> This path of course does not exist on my system and appears to be an
> artifact of the Qt build process from Nokia.
>
> I can not find any other qmake.exe binaries on the system and at this point
> I do not understand why the configuration does not work.
>
> If you have any advice that you can offer, I will greatly appreciate the
> help.
>

You need to rebuild Qt using visual studio.

John


More information about the CMake mailing list