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

Andreas Pakulat apaku at gmx.de
Fri Sep 7 09:27:02 EDT 2012


Hi,

as Michael said, don't move Qt around.

In fact Qt itself does not support this at all, so a Qt installation
that is moved after the install process and without re-running the
patching or a writing a qt.conf file is to be considered a broken Qt
installation. It'll also not find plugins etc. itself either.

Andreas

On Fri, Sep 7, 2012 at 1:37 PM, NoRulez <norulez at me.com> wrote:
> 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
>
> --
>
> 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


More information about the CMake mailing list