summaryrefslogtreecommitdiffstats
path: root/tests
diff options
context:
space:
mode:
authorJoerg Bornemann <joerg.bornemann@qt.io>2024-01-10 16:48:08 +0100
committerJoerg Bornemann <joerg.bornemann@qt.io>2024-01-15 20:57:28 +0100
commit9c755644b2b137aac77ae77bd6821d2ac96debae (patch)
tree1a50263e69fa8eaa581312afa278316d8e634e4a /tests
parent44340b0f09db0a893be6216c73140a445582928c (diff)
Add CMake autotest
Task-number: QTBUG-84884 Change-Id: I7be48ae60c1b08dee6e95b042b9c72d809a9f72f Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io> Reviewed-by: Alexey Edelev <alexey.edelev@qt.io> Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
Diffstat (limited to 'tests')
-rw-r--r--tests/auto/CMakeLists.txt2
-rw-r--r--tests/auto/cmake/CMakeLists.txt16
-rw-r--r--tests/auto/cmake/test_waylandclient/CMakeLists.txt8
3 files changed, 10 insertions, 16 deletions
diff --git a/tests/auto/CMakeLists.txt b/tests/auto/CMakeLists.txt
index 5c1cd7c53..87e83b552 100644
--- a/tests/auto/CMakeLists.txt
+++ b/tests/auto/CMakeLists.txt
@@ -7,7 +7,7 @@ if(TARGET Qt::WaylandClient)
add_subdirectory(client)
endif()
if(TARGET Qt::WaylandClient AND TARGET Qt::WaylandCompositor)
- #add_subdirectory(cmake) # special case
+ add_subdirectory(cmake)
endif()
if(TARGET Qt::WaylandCompositor)
add_subdirectory(compositor)
diff --git a/tests/auto/cmake/CMakeLists.txt b/tests/auto/cmake/CMakeLists.txt
index 3c5dc2788..ec8a54567 100644
--- a/tests/auto/cmake/CMakeLists.txt
+++ b/tests/auto/cmake/CMakeLists.txt
@@ -1,21 +1,19 @@
# Copyright (C) 2022 The Qt Company Ltd.
# SPDX-License-Identifier: BSD-3-Clause
-
cmake_minimum_required(VERSION 3.16)
-
-project(qmake_cmake_files)
+project(qtwayland_cmake_tests)
enable_testing()
-find_package(Qt5Core REQUIRED)
-set(Qt5_MODULE_TEST_DEPENDS Quick)
+find_package(Qt6Core REQUIRED)
+set(Qt6_MODULE_TEST_DEPENDS Quick)
-include("${_Qt5CTestMacros}")
+include("${_Qt6CTestMacros}")
-test_module_includes(
+_qt_internal_test_module_includes(
WaylandCompositor QWaylandBufferRef
)
-# Can't test in `test_module_includes`, WaylandClient has no public headers
-expect_pass(test_waylandclient)
+# Can't test in `_qt_internal_test_module_includes`, WaylandClient has no public headers
+_qt_internal_test_expect_pass(test_waylandclient)
diff --git a/tests/auto/cmake/test_waylandclient/CMakeLists.txt b/tests/auto/cmake/test_waylandclient/CMakeLists.txt
index 78fd6e3a2..cad8d45d3 100644
--- a/tests/auto/cmake/test_waylandclient/CMakeLists.txt
+++ b/tests/auto/cmake/test_waylandclient/CMakeLists.txt
@@ -6,10 +6,6 @@ project(test_plugins)
cmake_minimum_required(VERSION 3.16)
cmake_policy(SET CMP0056 NEW)
-find_package(Qt5WaylandClient REQUIRED)
-
-set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} ${Qt5Core_EXECUTABLE_COMPILE_FLAGS}")
-
-include_directories(${Qt5WaylandClient_PRIVATE_INCLUDE_DIRS})
+find_package(Qt6WaylandClient REQUIRED)
add_executable(test_waylandclient_exe main.cpp)
-target_link_libraries(test_waylandclient_exe Qt5::WaylandClient)
+target_link_libraries(test_waylandclient_exe Qt6::WaylandClientPrivate)