diff options
Diffstat (limited to 'Tests/QtAutogen/MacOsFW/CMakeLists.txt')
-rw-r--r-- | Tests/QtAutogen/MacOsFW/CMakeLists.txt | 22 |
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) |