summaryrefslogtreecommitdiffstats
path: root/Tests/QtAutogen/MacOsFW/CMakeLists.txt
diff options
context:
space:
mode:
authorCraig Scott <craig.scott@crascit.com>2021-10-05 12:26:40 (GMT)
committerKitware Robot <kwrobot@kitware.com>2021-10-05 12:27:02 (GMT)
commita31447417f65ac37c4a4966fc7314c40b3fca91b (patch)
tree79ab98c7addd0e6d0183f31c95f53105760254e7 /Tests/QtAutogen/MacOsFW/CMakeLists.txt
parent1b21eb82126bb350a4cbe8b2f7969913407b81a8 (diff)
parenta7420884723c4fb09e6370fb25710a2172c10a0c (diff)
downloadCMake-a31447417f65ac37c4a4966fc7314c40b3fca91b.zip
CMake-a31447417f65ac37c4a4966fc7314c40b3fca91b.tar.gz
CMake-a31447417f65ac37c4a4966fc7314c40b3fca91b.tar.bz2
Merge topic 'qt6-tests'
a742088472 Tests: Add support for testing Qt6 Acked-by: Kitware Robot <kwrobot@kitware.com> Merge-request: !6587
Diffstat (limited to 'Tests/QtAutogen/MacOsFW/CMakeLists.txt')
-rw-r--r--Tests/QtAutogen/MacOsFW/CMakeLists.txt22
1 files changed, 12 insertions, 10 deletions
diff --git a/Tests/QtAutogen/MacOsFW/CMakeLists.txt b/Tests/QtAutogen/MacOsFW/CMakeLists.txt
index c08efc4..27c5f43 100644
--- a/Tests/QtAutogen/MacOsFW/CMakeLists.txt
+++ b/Tests/QtAutogen/MacOsFW/CMakeLists.txt
@@ -1,21 +1,23 @@
-cmake_minimum_required(VERSION 3.10)
+cmake_minimum_required(VERSION 3.16)
project(MacOsFW)
include("../AutogenGuiTest.cmake")
-find_package(Qt5Test REQUIRED)
+find_package(Qt${QT_TEST_VERSION}Test REQUIRED)
+
+if(QT_TEST_VERSION EQUAL 5)
+ set(CMAKE_CXX_STANDARD 11)
+elseif(QT_TEST_VERSION EQUAL 6)
+ set(CMAKE_CXX_STANDARD 17)
+else()
+ message(FATAL_ERROR "Unsupported Qt version: ${QT_TEST_VERSION}")
+endif()
-set(CMAKE_CXX_STANDARD 11)
set(CMAKE_RUNTIME_OUTPUT_DIRECTORY ${CMAKE_BINARY_DIR}/output/bin)
set(CMAKE_LIBRARY_OUTPUT_DIRECTORY ${CMAKE_BINARY_DIR}/output/lib)
set(CMAKE_INSTALL_NAME_DIR ${CMAKE_BINARY_DIR}/output/lib)
-if(POLICY CMP0042) # in CMake 3.0.0+
- set (CMAKE_MACOSX_RPATH OFF) # otherwise ON by default
-endif(POLICY CMP0042)
-
-if(POLICY CMP0068) # in CMake 3.9+
- cmake_policy(SET CMP0068 NEW)
-endif(POLICY CMP0068)
+set (CMAKE_MACOSX_RPATH OFF) # otherwise ON by default
+cmake_policy(SET CMP0068 NEW)
add_subdirectory(src)
add_subdirectory(test)