summaryrefslogtreecommitdiffstats
path: root/examples/bluetooth/lowenergyscanner/CMakeLists.txt
diff options
context:
space:
mode:
authorJuha Vuolle <juha.vuolle@qt.io>2023-03-24 13:57:14 +0200
committerQt Cherry-pick Bot <cherrypick_bot@qt-project.org>2023-03-30 10:37:12 +0000
commit42990830c3d845458483f31ba36c2fa59d0e3f9f (patch)
treee377f7d883d8660dc0d0bccd053194a2b6da5090 /examples/bluetooth/lowenergyscanner/CMakeLists.txt
parent7baabffc7b4b2b42f552279c4801689ab5b204a7 (diff)
Fix .plist when building an example for iOS with CMake
When building an example for iOS with qmake (qt-cmake -GXcode) the local Info.plists of three of the examples don't work, because they were using qmake substitutions (${EXECUTABLE_NAME} instead of ${MACOSX_BUNDLE_EXECUTABLE_NAME}), which resulted in "CFBundleExecutable is not specified". Instead use shared plist files, each for CMake and qmake. One of the removed files contained NSBluetoothPeripheralUsageDescription key, which I think can be discarded now; it is intended for iOS < 13, and the minimum for Qt 6 is 13. Change-Id: I901dc176c001e25ce88d42b9456b6e16d8f43c20 Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org> Reviewed-by: Timur Pocheptsov <timur.pocheptsov@qt.io> (cherry picked from commit 0d1db5eabc9df56c92b1ef836060bf5232524e9e) Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
Diffstat (limited to 'examples/bluetooth/lowenergyscanner/CMakeLists.txt')
-rw-r--r--examples/bluetooth/lowenergyscanner/CMakeLists.txt6
1 files changed, 3 insertions, 3 deletions
diff --git a/examples/bluetooth/lowenergyscanner/CMakeLists.txt b/examples/bluetooth/lowenergyscanner/CMakeLists.txt
index 6f5f5692..252a6818 100644
--- a/examples/bluetooth/lowenergyscanner/CMakeLists.txt
+++ b/examples/bluetooth/lowenergyscanner/CMakeLists.txt
@@ -31,13 +31,13 @@ target_link_libraries(lowenergyscanner PUBLIC
)
if (APPLE)
+ # Using absolute path for shared plist files is a Ninja bug workaround
+ get_filename_component(SHARED_PLIST_DIR ${CMAKE_CURRENT_SOURCE_DIR}/../shared ABSOLUTE)
if (IOS)
set_target_properties(lowenergyscanner PROPERTIES
- MACOSX_BUNDLE_INFO_PLIST "${CMAKE_CURRENT_SOURCE_DIR}/Info.plist"
+ MACOSX_BUNDLE_INFO_PLIST "${SHARED_PLIST_DIR}/Info.cmake.ios.plist"
)
else()
- # Using absolute path for shared plist files is a Ninja bug workaround
- get_filename_component(SHARED_PLIST_DIR ${CMAKE_CURRENT_SOURCE_DIR}/../shared ABSOLUTE)
set_target_properties(lowenergyscanner PROPERTIES
MACOSX_BUNDLE_INFO_PLIST "${SHARED_PLIST_DIR}/Info.cmake.macos.plist"
)