View Issue Details [ Jump to Notes ] | [ Print ] | ||||||||
ID | Project | Category | View Status | Date Submitted | Last Update | ||||
0011789 | CMake | CMake | public | 2011-02-03 03:33 | 2011-02-04 10:49 | ||||
Reporter | Jean Porcherot | ||||||||
Assigned To | Clinton Stimpson | ||||||||
Priority | normal | Severity | minor | Reproducibility | always | ||||
Status | closed | Resolution | won't fix | ||||||
Platform | Win XP/Seven | OS | OS Version | ||||||
Product Version | CMake 2.8.3 | ||||||||
Target Version | Fixed in Version | ||||||||
Summary | 0011789: 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 | ||||||||
Tags | No tags attached. | ||||||||
Attached Files | |||||||||
Relationships | ||||||
|
Relationships |
Notes | |
(0025263) Clinton Stimpson (developer) 2011-02-03 18:46 |
Typically, people put it in their PATH environment variable because they need their apps (that were just built) to find the Qt dlls at runtime. The PATH environment variable has a higher priority than any of those paths in that find_program() call. So that and CMAKE_PREFIX_PATH should probably be preferred as general ways to find things. |
(0025276) Jean Porcherot (reporter) 2011-02-04 05:49 |
OK, adding set( CMAKE_PREFIX_PATH "$ENV{QTDIR}/bin" ) works well. Thanks for your help and reactivity! Jean |
(0025282) Clinton Stimpson (developer) 2011-02-04 10:49 |
closing.. as there are more general ways of telling cmake what you want found. |
Notes |
Issue History | |||
Date Modified | Username | Field | Change |
2011-02-03 03:33 | Jean Porcherot | New Issue | |
2011-02-03 08:15 | Brad King | Relationship added | related to 0011779 |
2011-02-03 08:15 | Brad King | Assigned To | => Clinton Stimpson |
2011-02-03 08:15 | Brad King | Status | new => assigned |
2011-02-03 18:46 | Clinton Stimpson | Note Added: 0025263 | |
2011-02-04 05:49 | Jean Porcherot | Note Added: 0025276 | |
2011-02-04 10:49 | Clinton Stimpson | Note Added: 0025282 | |
2011-02-04 10:49 | Clinton Stimpson | Status | assigned => closed |
2011-02-04 10:49 | Clinton Stimpson | Resolution | open => won't fix |
Issue History |
Copyright © 2000 - 2018 MantisBT Team |