Important: Please read the Qt Code of Conduct - https://forum.qt.io/topic/113070/qt-code-of-conduct

[CMake] Windows 8 & Qt



  • Hello, today i want reCMake project...first problem with Qt can't found...so i reinstall and again...i don't know why...

    Have anyone this problem? CMake told me "Could not find Qt4" but i install Libraries & SDK...or will in near future Qt support Windows 8?


  • Moderators

    Is qmake (et al.) located in a directory referenced by your PATH environment variable?



  • Yes

    Last block of Path
    @C:\Qt\4.8.1\bin@

    Qmake path:
    @C:\Qt\4.8.1\bin\qmake.exe@



  • Dont know anyone?



  • I'm trying to compile this qt hello world with cmake (http://cor-net.org/hello-world-in-qt-using-cmake-and-openembedded/) on Windows 8 Consumer Preview.
    Due to the lack of a mkspec for Visual Studio 11, I'm trying it with Visual Studio 2010.
    I'm new to cmake, but it seems that FindQt4 module is not expecting the "Qt: Untested Windows
    version 6.2 detected!" line qt prints:

    Could NOT find Qt4 (missing: QT_MOC_EXECUTABLE QT_RCC_EXECUTABLE
    QT_UIC_EXECUTABLE QT_INCLUDE_DIR) (found version "Qt: Untested Windows
    version 6.2 detected!

    4.8.0")

    Also I don't know why is it necessary to print that line every single time. Once on compile/install time would suffice I guess. I don't know which is easier to patch the module or patch qt.



  • I have recently installed Qt SDK on Win7 64-bit. I noticed that under Start>Qt SDK>Desktop is a set of shortcuts to launch terminals that have different environment settings. Variable QTDIR points to different folders with mingw or VS2008 Qt libs etc. So, I hope that is helpful.

    However, for my build, that convenience with QTDIR somehow does not propagate into FindQt4.cmake.
    So HTH, but I expect it may not solve your problem.



  • The best solution is to create *.bat file which will set environment for you in console window. There must be all environment variables and commands. Try to inherit qmake environment batch.


Log in to reply