diff options
author | Stephen Kelly <steveire@gmail.com> | 2013-03-16 17:25:59 (GMT) |
---|---|---|
committer | Brad King <brad.king@kitware.com> | 2013-03-18 13:31:33 (GMT) |
commit | 4aa10cd6d67c051b3659cd33aee17391e4a8318b (patch) | |
tree | 3795ec25db9606ad2d7f057b1224ddd30ed4f1fa /Tests/RunCMake/CMakeLists.txt | |
parent | 03b0ceebe5f8ca27b54a2d09ad38fb89c298f800 (diff) | |
download | CMake-4aa10cd6d67c051b3659cd33aee17391e4a8318b.zip CMake-4aa10cd6d67c051b3659cd33aee17391e4a8318b.tar.gz CMake-4aa10cd6d67c051b3659cd33aee17391e4a8318b.tar.bz2 |
FindQt4: Set the INTERFACE_QT_MAJOR_VERSION for Qt4::QtCore
With a similar commit in Qt 5, this will error at CMake time if
an attempt is made to use
target_link_libraries(foo Qt4::QtCore Qt5::Core)
Diffstat (limited to 'Tests/RunCMake/CMakeLists.txt')
-rw-r--r-- | Tests/RunCMake/CMakeLists.txt | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/Tests/RunCMake/CMakeLists.txt b/Tests/RunCMake/CMakeLists.txt index 4b4bd31..7f9b9fd 100644 --- a/Tests/RunCMake/CMakeLists.txt +++ b/Tests/RunCMake/CMakeLists.txt @@ -75,6 +75,12 @@ add_RunCMake_test(include_directories) add_RunCMake_test(list) add_RunCMake_test(CMP0004) +find_package(Qt4 QUIET) +find_package(Qt5Core QUIET) +if (QT4_FOUND AND Qt5Core_FOUND AND Qt5Core_VERSION VERSION_GREATER 5.0.2) + add_RunCMake_test(IncompatibleQt) +endif() + if("${CMAKE_TEST_GENERATOR}" MATCHES "Visual Studio [^6]") add_RunCMake_test(include_external_msproject) add_RunCMake_test(SolutionGlobalSections) |