diff options
author | Rolf Eike Beer <eike@sf-mail.de> | 2012-01-18 17:23:21 (GMT) |
---|---|---|
committer | Rolf Eike Beer <eike@sf-mail.de> | 2012-01-18 17:23:21 (GMT) |
commit | 8d830436a42ec06555334b5c5ec73b41328d5f06 (patch) | |
tree | 6720f3661a6d6dbebb62a802abda526a51ff2095 /Tests/CMakeOnly | |
parent | e797e7fb412ccfb61eada7f2925e505082da449a (diff) | |
download | CMake-8d830436a42ec06555334b5c5ec73b41328d5f06.zip CMake-8d830436a42ec06555334b5c5ec73b41328d5f06.tar.gz CMake-8d830436a42ec06555334b5c5ec73b41328d5f06.tar.bz2 |
AllFindModules test: also check Qt3 modules if Qt4 is not found
Diffstat (limited to 'Tests/CMakeOnly')
-rw-r--r-- | Tests/CMakeOnly/AllFindModules/CMakeLists.txt | 15 |
1 files changed, 13 insertions, 2 deletions
diff --git a/Tests/CMakeOnly/AllFindModules/CMakeLists.txt b/Tests/CMakeOnly/AllFindModules/CMakeLists.txt index 06b4736..8a38f06 100644 --- a/Tests/CMakeOnly/AllFindModules/CMakeLists.txt +++ b/Tests/CMakeOnly/AllFindModules/CMakeLists.txt @@ -10,6 +10,11 @@ message(STATUS "CTEST_FULL_OUTPUT") file(GLOB FIND_MODULES "${CMAKE_CURRENT_SOURCE_DIR}/../../../Modules/Find*.cmake" ) +macro(do_find MODULE_NAME) + message(STATUS " Checking Find${MODULE_NAME}") + find_package(${MODULE_NAME}) +endmacro(do_find) + foreach(FIND_MODULE ${FIND_MODULES}) string(REGEX REPLACE ".*/Find(.*)\\.cmake$" "\\1" MODULE_NAME "${FIND_MODULE}") @@ -21,8 +26,14 @@ foreach(FIND_MODULE ${FIND_MODULES}) if (NOT MODULE_NAME STREQUAL "Qt" AND NOT MODULE_NAME STREQUAL "Qt3" AND NOT MODULE_NAME STREQUAL "KDE3") - message(STATUS " Checking Find${MODULE_NAME}") - find_package(${MODULE_NAME}) + do_find(${MODULE_NAME}) endif () endforeach(FIND_MODULE) + +# Qt4 is not present, so we can check Qt3 +if(NOT QT4_FOUND) + foreach(FIND_MODULE "Qt3" "Qt" "KDE3") + do_find(${FIND_MODULE}) + endforeach(FIND_MODULE) +endif(NOT QT4_FOUND) |