aboutsummaryrefslogtreecommitdiff
path: root/tests/CMakeLists.txt
diff options
context:
space:
mode:
authorLinus Jahn <lnj@kaidan.im>2020-07-02 18:58:43 +0200
committerLNJ <lnj@kaidan.im>2020-07-03 13:13:31 +0200
commit8d6f865a9e312d3b4f686ff99af6e7fe9e8c5b13 (patch)
tree01d2942a5d91400c5233d67aa347585b5d6b2731 /tests/CMakeLists.txt
parent3dd3cb24f419b1a1cac2b7a0121507fd86000986 (diff)
downloadqxmpp-8d6f865a9e312d3b4f686ff99af6e7fe9e8c5b13.tar.gz
Introduce Qt 6 compatibility
Diffstat (limited to 'tests/CMakeLists.txt')
-rw-r--r--tests/CMakeLists.txt8
1 files changed, 5 insertions, 3 deletions
diff --git a/tests/CMakeLists.txt b/tests/CMakeLists.txt
index 04c160fa..95134421 100644
--- a/tests/CMakeLists.txt
+++ b/tests/CMakeLists.txt
@@ -1,11 +1,14 @@
include_directories(.)
-find_package(Qt5 REQUIRED COMPONENTS Test)
+find_package(Qt6 COMPONENTS Test)
+if(NOT Qt6_FOUND)
+ find_package(Qt5 REQUIRED COMPONENTS Test)
+endif()
macro(add_simple_test TEST_NAME)
add_executable(tst_${TEST_NAME} ${TEST_NAME}/tst_${TEST_NAME}.cpp)
add_test(tst_${TEST_NAME} tst_${TEST_NAME})
- target_link_libraries(tst_${TEST_NAME} Qt5::Test qxmpp)
+ target_link_libraries(tst_${TEST_NAME} ${QT_TARGET}::Test qxmpp)
endmacro()
include_directories(${PROJECT_SOURCE_DIR}/src/base)
@@ -66,4 +69,3 @@ endif()
add_subdirectory(qxmpptransfermanager)
add_subdirectory(qxmpputils)
add_subdirectory(qxmppuploadrequestmanager)
-