diff options
author | Craig Scott <craig.scott@crascit.com> | 2021-10-04 11:10:56 (GMT) |
---|---|---|
committer | Craig Scott <craig.scott@crascit.com> | 2021-10-04 11:10:57 (GMT) |
commit | a7420884723c4fb09e6370fb25710a2172c10a0c (patch) | |
tree | 7d1d5cd434ca27e8b038457c784bf08af7f36c2f /Tests/QtAutogen/RerunMocPlugin | |
parent | b3a0bddc4e1c8f1f86078cdffaebbc4c493e4409 (diff) | |
download | CMake-a7420884723c4fb09e6370fb25710a2172c10a0c.zip CMake-a7420884723c4fb09e6370fb25710a2172c10a0c.tar.gz CMake-a7420884723c4fb09e6370fb25710a2172c10a0c.tar.bz2 |
Tests: Add support for testing Qt6
The minimum CMake version for Qt6 is 3.16, so all the calls to
cmake_minimum_required() are updated here to enforce that
minimum. This will avoid any CMake version-related warnings
from Qt.
Avoid hard-coding Qt5 where the tests could now be using
Qt5 or Qt6.
Fixes: #22188
Diffstat (limited to 'Tests/QtAutogen/RerunMocPlugin')
-rw-r--r-- | Tests/QtAutogen/RerunMocPlugin/CMakeLists.txt | 3 | ||||
-rw-r--r-- | Tests/QtAutogen/RerunMocPlugin/MocPlugin/CMakeLists.txt | 4 |
2 files changed, 4 insertions, 3 deletions
diff --git a/Tests/QtAutogen/RerunMocPlugin/CMakeLists.txt b/Tests/QtAutogen/RerunMocPlugin/CMakeLists.txt index a7fb2d7..2d2edb4 100644 --- a/Tests/QtAutogen/RerunMocPlugin/CMakeLists.txt +++ b/Tests/QtAutogen/RerunMocPlugin/CMakeLists.txt @@ -1,4 +1,4 @@ -cmake_minimum_required(VERSION 3.10) +cmake_minimum_required(VERSION 3.16) project(RerunMocPlugin) include("../AutogenCoreTest.cmake") @@ -63,6 +63,7 @@ try_compile(MOC_PLUGIN MocPlugin CMAKE_FLAGS "-DQT_TEST_VERSION=${QT_TEST_VERSION}" "-DCMAKE_AUTOGEN_VERBOSE=${CMAKE_AUTOGEN_VERBOSE}" + "-DCMAKE_PREFIX_PATH:STRING=${CMAKE_PREFIX_PATH}" "-DQT_QMAKE_EXECUTABLE:FILEPATH=${QT_QMAKE_EXECUTABLE}" OUTPUT_VARIABLE output ) diff --git a/Tests/QtAutogen/RerunMocPlugin/MocPlugin/CMakeLists.txt b/Tests/QtAutogen/RerunMocPlugin/MocPlugin/CMakeLists.txt index 5068289..8097fd0 100644 --- a/Tests/QtAutogen/RerunMocPlugin/MocPlugin/CMakeLists.txt +++ b/Tests/QtAutogen/RerunMocPlugin/MocPlugin/CMakeLists.txt @@ -1,4 +1,4 @@ -cmake_minimum_required(VERSION 3.10) +cmake_minimum_required(VERSION 3.16) project(MocPlugin) include("../../AutogenGuiTest.cmake") @@ -22,7 +22,7 @@ configure_file(jsonIn/StyleE.json jsonFiles/StyleE_Custom.json) set(CMAKE_AUTOMOC TRUE) include_directories("${CMAKE_CURRENT_BINARY_DIR}/jsonFiles") -link_libraries(Qt5::Widgets) +link_libraries(Qt${QT_TEST_VERSION}::Widgets) add_library(PlugA STATIC StyleA.cpp) add_library(PlugB STATIC StyleB.cpp) |