summaryrefslogtreecommitdiffstats
path: root/tests/auto/cmake
diff options
context:
space:
mode:
Diffstat (limited to 'tests/auto/cmake')
-rw-r--r--tests/auto/cmake/CMakeLists.txt19
-rw-r--r--tests/auto/cmake/cmake.pro6
-rw-r--r--tests/auto/cmake/test_waylandclient/CMakeLists.txt13
3 files changed, 16 insertions, 22 deletions
diff --git a/tests/auto/cmake/CMakeLists.txt b/tests/auto/cmake/CMakeLists.txt
index 270d11aa6..ec8a54567 100644
--- a/tests/auto/cmake/CMakeLists.txt
+++ b/tests/auto/cmake/CMakeLists.txt
@@ -1,18 +1,19 @@
+# Copyright (C) 2022 The Qt Company Ltd.
+# SPDX-License-Identifier: BSD-3-Clause
-cmake_minimum_required(VERSION 2.8)
-
-project(qmake_cmake_files)
+cmake_minimum_required(VERSION 3.16)
+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/cmake.pro b/tests/auto/cmake/cmake.pro
deleted file mode 100644
index 5098c2ce4..000000000
--- a/tests/auto/cmake/cmake.pro
+++ /dev/null
@@ -1,6 +0,0 @@
-# Cause make to do nothing.
-TEMPLATE = subdirs
-
-CMAKE_QT_MODULES_UNDER_TEST = waylandclient
-
-CONFIG += ctest_testcase
diff --git a/tests/auto/cmake/test_waylandclient/CMakeLists.txt b/tests/auto/cmake/test_waylandclient/CMakeLists.txt
index 3788a4927..cad8d45d3 100644
--- a/tests/auto/cmake/test_waylandclient/CMakeLists.txt
+++ b/tests/auto/cmake/test_waylandclient/CMakeLists.txt
@@ -1,12 +1,11 @@
+# Copyright (C) 2022 The Qt Company Ltd.
+# SPDX-License-Identifier: BSD-3-Clause
+
project(test_plugins)
-cmake_minimum_required(VERSION 2.8)
+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)