summaryrefslogtreecommitdiffstats
path: root/tests/manual/qlowenergycontroller/CMakeLists.txt
diff options
context:
space:
mode:
authorJuha Vuolle <juha.vuolle@insta.fi>2021-12-07 13:57:23 +0200
committerQt Cherry-pick Bot <cherrypick_bot@qt-project.org>2021-12-15 15:48:18 +0000
commit7738e8762a211cc72d38633d3b0346d50db47113 (patch)
treed637b9fed6001cf641362d0750a7cdd520e9bebc /tests/manual/qlowenergycontroller/CMakeLists.txt
parent685bef00c6dc63613fbb8876ee41b870c980039f (diff)
Adjust BT LE test to pass with most client-server combinations
Task-number: QTBUG-98781 Change-Id: I97f365136000cf5d9d10e8d5e3e69c56654e28a3 Reviewed-by: Ivan Solovev <ivan.solovev@qt.io> Reviewed-by: Alex Blasche <alexander.blasche@qt.io> (cherry picked from commit 07ea79b92b59f5bb2d644a6f690032b6c54f7641) Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
Diffstat (limited to 'tests/manual/qlowenergycontroller/CMakeLists.txt')
-rw-r--r--tests/manual/qlowenergycontroller/CMakeLists.txt27
1 files changed, 27 insertions, 0 deletions
diff --git a/tests/manual/qlowenergycontroller/CMakeLists.txt b/tests/manual/qlowenergycontroller/CMakeLists.txt
index 0a2a89da..6573c19c 100644
--- a/tests/manual/qlowenergycontroller/CMakeLists.txt
+++ b/tests/manual/qlowenergycontroller/CMakeLists.txt
@@ -1,3 +1,28 @@
+cmake_minimum_required(VERSION 3.16...3.21)
+
+if(NOT TARGET Qt::Bluetooth)
+ # for standalone build (and the only way for iOS)
+ project(tst_qlowenergycontroller_device LANGUAGES CXX)
+
+ set(CMAKE_AUTOMOC ON)
+
+ find_package(Qt6 COMPONENTS Bluetooth Core Test Gui)
+
+ qt_add_executable(
+ tst_qlowenergycontroller_device
+ tst_qlowenergycontroller_device.cpp
+ )
+ target_link_libraries(
+ tst_qlowenergycontroller_device
+ PUBLIC
+ Qt::Core
+ Qt::Bluetooth
+ Qt::Test
+ Qt::Gui
+ )
+
+else()
+
qt_internal_add_test(tst_qlowenergycontroller_device
SOURCES
tst_qlowenergycontroller_device.cpp
@@ -11,6 +36,8 @@ qt_internal_extend_target(tst_qlowenergycontroller_device
QT_ANDROID_BLUETOOTH
)
+endif()
+
set_target_properties(tst_qlowenergycontroller_device PROPERTIES
WIN32_EXECUTABLE TRUE
MACOSX_BUNDLE TRUE