[CMake] CMake can't find the correct Qt installation paths

NoRulez norulez at me.com
Fri Sep 7 07:37:58 EDT 2012


Hello,

when I install Qt to the location C:\Qt\QtSDK and then I run cmake, everything is working fine.
But if I rename the directory to C:\Qt\QtSDL then cmake have problems to find Qt because qmake.exe isn't patched.

In qmake.exe the path to the libraries are set to "C:\Qt\QtSDK\..." which is also used for the query command.

So, if i patch qmake.exe (Rename the directory in the qmake.exe file => works only if the length of the directory name is the same),
cmake works fine but the problem is, that cmake tries to find out the location of libraries and so on from the query, which is wrong in my oppinion,
because if I want to move the custom build Qt library to another location then cmake doesn't find Qt.

For example when I rename the directory to C:\Qt\QtSDL and run qmake -query:
QT_INSTALL_PREFIX:C:\Qt\QtSDK\Desktop\Qt\4.8.1\mingw
QT_INSTALL_DATA:C:\Qt\QtSDK\Desktop\Qt\4.8.1\mingw\
QT_INSTALL_DOCS:C:\Qt\QtSDK\Desktop\Qt\4.8.1\mingw\doc
QT_INSTALL_HEADERS:C:\Qt\QtSDK\Desktop\Qt\4.8.1\mingw\include
QT_INSTALL_LIBS:C:\Qt\QtSDK\Desktop\Qt\4.8.1\mingw\lib
QT_INSTALL_BINS:C:\Qt\QtSDK\Desktop\Qt\4.8.1\mingw\bin
QT_INSTALL_PLUGINS:C:\Qt\QtSDK\Desktop\Qt\4.8.1\mingw\plugins
QT_INSTALL_IMPORTS:C:\Qt\QtSDK\Desktop\Qt\4.8.1\mingw\imports
QT_INSTALL_TRANSLATIONS:C:\Qt\QtSDK\Desktop\Qt\4.8.1\mingw\translations
QT_INSTALL_CONFIGURATION:C:/Qt/QtSDK/Desktop/Qt/4.8.1/mingw
QT_INSTALL_EXAMPLES:C:\Qt\QtSDK\Examples\4.7
QT_INSTALL_DEMOS:C:\Qt\QtSDK\Demos\4.7
QMAKE_MKSPECS:C:\Qt\QtSDK\Desktop\Qt\4.8.1\mingw\\mkspecs
QMAKE_VERSION:2.01a
QT_VERSION:4.8.1

When I run it from the drive letter D:, E:, F:, ..., then the result is the same.

Best Regards
NoRulez
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.cmake.org/pipermail/cmake/attachments/20120907/633fc913/attachment.htm>


More information about the CMake mailing list