diff options
author | David Cole <david.cole@kitware.com> | 2012-10-31 20:34:20 (GMT) |
---|---|---|
committer | CMake Topic Stage <kwrobot@kitware.com> | 2012-10-31 20:34:20 (GMT) |
commit | 2c3bfb6876835200cf308fbe175161c68735f4a1 (patch) | |
tree | 6889c017eabc619effab7ef28807e845825ed32a /Modules | |
parent | d8233e58372e18200a83e66732bc7918aadb06f4 (diff) | |
parent | 041fb29bd7b25a03ecf5aab2bb6737a10ab21e67 (diff) | |
download | CMake-2c3bfb6876835200cf308fbe175161c68735f4a1.zip CMake-2c3bfb6876835200cf308fbe175161c68735f4a1.tar.gz CMake-2c3bfb6876835200cf308fbe175161c68735f4a1.tar.bz2 |
Merge topic 'FindQt-version-selection'
041fb29 FindQt: add some more places to look for Qt3
7bb9395 FindQt: improve version selection
Diffstat (limited to 'Modules')
-rw-r--r-- | Modules/FindQt.cmake | 12 |
1 files changed, 8 insertions, 4 deletions
diff --git a/Modules/FindQt.cmake b/Modules/FindQt.cmake index 13f18fe..5af3125 100644 --- a/Modules/FindQt.cmake +++ b/Modules/FindQt.cmake @@ -31,7 +31,7 @@ # License text for the above reference.) # look for signs of qt3 installations -file(GLOB GLOB_TEMP_VAR /usr/lib/qt-3*/bin/qmake) +file(GLOB GLOB_TEMP_VAR /usr/lib*/qt-3*/bin/qmake /usr/lib*/qt3*/bin/qmake) if(GLOB_TEMP_VAR) set(QT3_INSTALLED TRUE) endif() @@ -56,6 +56,10 @@ if(GLOB_TEMP_VAR) endif() set(GLOB_TEMP_VAR) +if (Qt_FIND_VERSION) + set(DESIRED_QT_VERSION "${Qt_FIND_VERSION}") +endif () + # now find qmake find_program(QT_QMAKE_EXECUTABLE_FINDQT NAMES qmake PATHS "${QT_SEARCH_PATH}/bin" "$ENV{QTDIR}/bin") if(QT_QMAKE_EXECUTABLE_FINDQT) @@ -113,15 +117,15 @@ if(QT3_QGLOBAL_H_FILE) set(QT3_INSTALLED TRUE) endif() -if(QT3_INSTALLED AND QT4_INSTALLED ) +if(QT3_INSTALLED AND QT4_INSTALLED AND NOT DESIRED_QT_VERSION) # force user to pick if we have both set(DESIRED_QT_VERSION 0 CACHE STRING "Pick a version of Qt to use: 3 or 4") else() # if only one found then pick that one - if(QT3_INSTALLED) + if(QT3_INSTALLED AND NOT DESIRED_QT_VERSION EQUAL 4) set(DESIRED_QT_VERSION 3 CACHE STRING "Pick a version of Qt to use: 3 or 4") endif() - if(QT4_INSTALLED) + if(QT4_INSTALLED AND NOT DESIRED_QT_VERSION EQUAL 3) set(DESIRED_QT_VERSION 4 CACHE STRING "Pick a version of Qt to use: 3 or 4") endif() endif() |