summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorØystein Heskestad <oystein.heskestad@qt.io>2023-09-22 11:39:42 +0200
committerØystein Heskestad <oystein.heskestad@qt.io>2023-09-27 11:47:10 +0200
commit9ff4ef8b39f6040a6082a1fac00856f3b4292849 (patch)
tree006a0442a83b894943fb7235d67f3dd52d8fb461
parenta8b3f5e649fa5c1646e5e347ddb7b4523d5dbcb6 (diff)
Update CMake-files for the simpleswitch manual tests
Task-number: QTBUG-112850 Change-Id: I574f61b61b6df46452ab7bb26c953d511510a952 Reviewed-by: Brett Stottlemyer <bstottle@ford.com> (cherry picked from commit 5c2795d8853c43f3738c0284fbe0e3335b780ae6) Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org> (cherry picked from commit 9e147f405906f56380f40694e03dff2cb3fdcfbb)
-rw-r--r--tests/manual/examples/simpleswitch/directconnectdynamicclient/CMakeLists.txt34
-rw-r--r--tests/manual/examples/simpleswitch/registryconnectedclient/CMakeLists.txt34
-rw-r--r--tests/manual/examples/simpleswitch/registryconnectedserver/CMakeLists.txt36
3 files changed, 31 insertions, 73 deletions
diff --git a/tests/manual/examples/simpleswitch/directconnectdynamicclient/CMakeLists.txt b/tests/manual/examples/simpleswitch/directconnectdynamicclient/CMakeLists.txt
index 828a4fe..c147fa2 100644
--- a/tests/manual/examples/simpleswitch/directconnectdynamicclient/CMakeLists.txt
+++ b/tests/manual/examples/simpleswitch/directconnectdynamicclient/CMakeLists.txt
@@ -2,7 +2,7 @@
# SPDX-License-Identifier: BSD-3-Clause
cmake_minimum_required(VERSION 3.16)
-project(directconnectdynamicclient LANGUAGES CXX)
+project(tst_directconnectdynamicclient VERSION "${QT_REPO_MODULE_VERSION}" LANGUAGES CXX)
if (ANDROID)
message(FATAL_ERROR "This project cannot be built on Android.")
@@ -10,31 +10,17 @@ endif()
set(CMAKE_AUTOMOC ON)
-if(NOT DEFINED INSTALL_EXAMPLESDIR)
- set(INSTALL_EXAMPLESDIR "examples")
-endif()
-
-set(INSTALL_EXAMPLEDIR "${INSTALL_EXAMPLESDIR}/remoteobjects/simpleswitch/directconnectdynamicclient")
-
-find_package(Qt6 REQUIRED COMPONENTS Core RemoteObjects)
-
-qt_add_executable(directconnectdynamicclient
- dynamicclient.cpp dynamicclient.h
- main.cpp
+qt_internal_add_manual_test(tst_directconnectdynamicclient
+ SOURCES
+ main.cpp
+ dynamicclient.cpp
+ dynamicclient.h
+ LIBRARIES
+ Qt::Core
+ Qt::RemoteObjects
)
-set_target_properties(directconnectdynamicclient PROPERTIES
+set_target_properties(tst_directconnectdynamicclient PROPERTIES
WIN32_EXECUTABLE FALSE
MACOSX_BUNDLE FALSE
)
-
-target_link_libraries(directconnectdynamicclient PUBLIC
- Qt::Core
- Qt::RemoteObjects
-)
-
-install(TARGETS directconnectdynamicclient
- RUNTIME DESTINATION "${INSTALL_EXAMPLEDIR}"
- BUNDLE DESTINATION "${INSTALL_EXAMPLEDIR}"
- LIBRARY DESTINATION "${INSTALL_EXAMPLEDIR}"
-)
diff --git a/tests/manual/examples/simpleswitch/registryconnectedclient/CMakeLists.txt b/tests/manual/examples/simpleswitch/registryconnectedclient/CMakeLists.txt
index 17c4609..aa75b41 100644
--- a/tests/manual/examples/simpleswitch/registryconnectedclient/CMakeLists.txt
+++ b/tests/manual/examples/simpleswitch/registryconnectedclient/CMakeLists.txt
@@ -2,7 +2,7 @@
# SPDX-License-Identifier: BSD-3-Clause
cmake_minimum_required(VERSION 3.16)
-project(registryconnectedclient LANGUAGES CXX)
+project(tst_registryconnectedclient VERSION "${QT_REPO_MODULE_VERSION}" LANGUAGES CXX)
if (ANDROID)
message(FATAL_ERROR "This project cannot be built on Android.")
@@ -10,31 +10,17 @@ endif()
set(CMAKE_AUTOMOC ON)
-if(NOT DEFINED INSTALL_EXAMPLESDIR)
- set(INSTALL_EXAMPLESDIR "examples")
-endif()
-
-set(INSTALL_EXAMPLEDIR "${INSTALL_EXAMPLESDIR}/remoteobjects/simpleswitch/registryconnectedclient")
-
-find_package(Qt6 REQUIRED COMPONENTS Core RemoteObjects)
-
-qt_add_executable(registryconnectedclient
- dynamicclient.cpp dynamicclient.h
- main.cpp
+qt_internal_add_manual_test(tst_registryconnectedclient
+ SOURCES
+ main.cpp
+ dynamicclient.cpp
+ dynamicclient.h
+ LIBRARIES
+ Qt::Core
+ Qt::RemoteObjects
)
-set_target_properties(registryconnectedclient PROPERTIES
+set_target_properties(tst_registryconnectedclient PROPERTIES
WIN32_EXECUTABLE FALSE
MACOSX_BUNDLE FALSE
)
-
-target_link_libraries(registryconnectedclient PUBLIC
- Qt::Core
- Qt::RemoteObjects
-)
-
-install(TARGETS registryconnectedclient
- RUNTIME DESTINATION "${INSTALL_EXAMPLEDIR}"
- BUNDLE DESTINATION "${INSTALL_EXAMPLEDIR}"
- LIBRARY DESTINATION "${INSTALL_EXAMPLEDIR}"
-)
diff --git a/tests/manual/examples/simpleswitch/registryconnectedserver/CMakeLists.txt b/tests/manual/examples/simpleswitch/registryconnectedserver/CMakeLists.txt
index 5239890..dc6a85b 100644
--- a/tests/manual/examples/simpleswitch/registryconnectedserver/CMakeLists.txt
+++ b/tests/manual/examples/simpleswitch/registryconnectedserver/CMakeLists.txt
@@ -2,7 +2,7 @@
# SPDX-License-Identifier: BSD-3-Clause
cmake_minimum_required(VERSION 3.16)
-project(registryconnectedserver LANGUAGES CXX)
+project(tst_registryconnectedserver VERSION "${QT_REPO_MODULE_VERSION}" LANGUAGES CXX)
if (ANDROID)
message(FATAL_ERROR "This project cannot be built on Android.")
@@ -11,35 +11,21 @@ endif()
set(CMAKE_INCLUDE_CURRENT_DIR ON)
set(CMAKE_AUTOMOC ON)
-if(NOT DEFINED INSTALL_EXAMPLESDIR)
- set(INSTALL_EXAMPLESDIR "examples")
-endif()
-
-set(INSTALL_EXAMPLEDIR "${INSTALL_EXAMPLESDIR}/remoteobjects/simpleswitch/registryconnectedserver")
-
-find_package(Qt6 REQUIRED COMPONENTS Core RemoteObjects)
-
-qt_add_executable(registryconnectedserver
- main.cpp
- simpleswitch.cpp simpleswitch.h
+qt_internal_add_manual_test(tst_registryconnectedserver
+ SOURCES
+ main.cpp
+ simpleswitch.cpp
+ simpleswitch.h
+ LIBRARIES
+ Qt::Core
+ Qt::RemoteObjects
)
-set_target_properties(registryconnectedserver PROPERTIES
+set_target_properties(tst_registryconnectedserver PROPERTIES
WIN32_EXECUTABLE FALSE
MACOSX_BUNDLE FALSE
)
-target_link_libraries(registryconnectedserver PUBLIC
- Qt::Core
- Qt::RemoteObjects
-)
-
-qt6_add_repc_sources(registryconnectedserver
+qt6_add_repc_sources(tst_registryconnectedserver
simpleswitch.rep
)
-
-install(TARGETS registryconnectedserver
- RUNTIME DESTINATION "${INSTALL_EXAMPLEDIR}"
- BUNDLE DESTINATION "${INSTALL_EXAMPLEDIR}"
- LIBRARY DESTINATION "${INSTALL_EXAMPLEDIR}"
-)