The following issue has been SUBMITTED. ====================================================================== http://public.kitware.com/Bug/view.php?id=11789 ====================================================================== Reported By: Jean Porcherot Assigned To: ====================================================================== Project: CMake Issue ID: 11789 Category: CMake Reproducibility: always Severity: minor Priority: normal Status: new ====================================================================== Date Submitted: 2011-02-03 03:33 EST Last Modified: 2011-02-03 03:33 EST ====================================================================== Summary: Unable to force a Qt version to be picked by cmake Description: Hi,
Earlier, I reported issue 0011779 (http://public.kitware.com/Bug/view.php?id=11779). James proposed a great solution that works...partially. I Added the qt.conf.in and it works fine...unless there is a Qt version installed on the PC. As proposed, I set QTDIR to C:/code/sw/3rdparty/Qt/4.7.1/qt-win32-msvc2008, but, on the PC I run cmake from, the devlopper installed Qt 4.5.2 some time ago. Then, FindQt4.cmake picks up the 4.5.2 version of Qt rather than the 4.7.1 I'm asking it to use through the QTDIR variable. That's because, we check for the registry before we check for the QTDIR path (see below): GET_FILENAME_COMPONENT(qt_install_version "[HKEY_CURRENT_USER\\Software\\trolltech\\Versions;DefaultQtVersion]" NAME) FIND_PROGRAM(QT_QMAKE_EXECUTABLE NAMES qmake qmake4 qmake-qt4 qmake-mac PATHS "[HKEY_CURRENT_USER\\Software\\Trolltech\\Qt3Versions\\4.0.0;InstallDir]/bin" "[HKEY_CURRENT_USER\\Software\\Trolltech\\Versions\\4.0.0;InstallDir]/bin" "[HKEY_CURRENT_USER\\Software\\Trolltech\\Versions\\${qt_install_version};InstallDir]/bin" $ENV{QTDIR}/bin DOC "The qmake executable for the Qt installation to use" ) So, once again, I had to modify the FindQt4.cmake script by commenting the GET_FILENAME_COMPONENT line. I'd rather not modify this file as the modification will be lost next time I'll upgrade cmake. Is there another way to workaround the problem from my CMakeLists.txt? Thanks in davance Jean ====================================================================== Issue History Date Modified Username Field Change ====================================================================== 2011-02-03 03:33 Jean Porcherot New Issue ====================================================================== _______________________________________________ cmake-developers mailing list [email protected] http://public.kitware.com/cgi-bin/mailman/listinfo/cmake-developers
