summaryrefslogtreecommitdiffstats
path: root/Tests/QtAutogen/ObjectLibrary
diff options
context:
space:
mode:
authorCraig Scott <craig.scott@crascit.com>2021-10-04 11:10:56 (GMT)
committerCraig Scott <craig.scott@crascit.com>2021-10-04 11:10:57 (GMT)
commita7420884723c4fb09e6370fb25710a2172c10a0c (patch)
tree7d1d5cd434ca27e8b038457c784bf08af7f36c2f /Tests/QtAutogen/ObjectLibrary
parentb3a0bddc4e1c8f1f86078cdffaebbc4c493e4409 (diff)
downloadCMake-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/ObjectLibrary')
-rw-r--r--Tests/QtAutogen/ObjectLibrary/CMakeLists.txt4
-rw-r--r--Tests/QtAutogen/ObjectLibrary/a/CMakeLists.txt2
2 files changed, 3 insertions, 3 deletions
diff --git a/Tests/QtAutogen/ObjectLibrary/CMakeLists.txt b/Tests/QtAutogen/ObjectLibrary/CMakeLists.txt
index e8af6c9..88d0998 100644
--- a/Tests/QtAutogen/ObjectLibrary/CMakeLists.txt
+++ b/Tests/QtAutogen/ObjectLibrary/CMakeLists.txt
@@ -1,4 +1,4 @@
-cmake_minimum_required(VERSION 3.10)
+cmake_minimum_required(VERSION 3.16)
project(ObjectLibrary)
include("../AutogenCoreTest.cmake")
@@ -11,7 +11,7 @@ add_subdirectory(a)
# Object library b defined locally
include_directories(b)
add_library(b OBJECT b/classb.cpp)
-target_compile_features(b PRIVATE ${QT_COMPILE_FEATURES})
+target_link_libraries(b PRIVATE ${QT_LIBRARIES})
# Executable with OBJECT library generator expressions
add_executable(someProgram main.cpp $<TARGET_OBJECTS:a> $<TARGET_OBJECTS:b>)
diff --git a/Tests/QtAutogen/ObjectLibrary/a/CMakeLists.txt b/Tests/QtAutogen/ObjectLibrary/a/CMakeLists.txt
index fe76ac3..5ace3ae 100644
--- a/Tests/QtAutogen/ObjectLibrary/a/CMakeLists.txt
+++ b/Tests/QtAutogen/ObjectLibrary/a/CMakeLists.txt
@@ -1,2 +1,2 @@
add_library(a OBJECT classa.cpp)
-target_compile_features(a PRIVATE ${QT_COMPILE_FEATURES})
+target_link_libraries(a PRIVATE ${QT_LIBRARIES})