summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorTamas Martinec <tamas.martinec@symbio.com>2021-11-12 14:17:33 +0200
committerQt Cherry-pick Bot <cherrypick_bot@qt-project.org>2021-11-26 13:15:49 +0000
commit0f9f434ef05a0cdd31995a5bf96aee6f2f5628b2 (patch)
tree1c4d5a1f005b18245dea5e08ea1e64a7b8f7438a
parentd6b470dc13411853bfd374f91fab24108b734832 (diff)
Take custom info.plists and Androidmanifests into use with cmake
Task-number: QTBUG-97977 Change-Id: I85ad6298d964bfe9fe5b8ddd9e83cb1e66664b6c Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io> (cherry picked from commit a798ef4e3d3bf93be82bfc0ad5d2ca2af0dcd2d5) Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
-rw-r--r--examples/sensors/accelbubble/CMakeLists.txt14
-rw-r--r--examples/sensors/maze/CMakeLists.txt13
-rw-r--r--examples/sensors/sensorsshowcase/CMakeLists.txt11
3 files changed, 34 insertions, 4 deletions
diff --git a/examples/sensors/accelbubble/CMakeLists.txt b/examples/sensors/accelbubble/CMakeLists.txt
index fe19731f..2709e7b2 100644
--- a/examples/sensors/accelbubble/CMakeLists.txt
+++ b/examples/sensors/accelbubble/CMakeLists.txt
@@ -22,6 +22,19 @@ set_target_properties(accelbubble PROPERTIES
WIN32_EXECUTABLE TRUE
MACOSX_BUNDLE TRUE
)
+
+if(ANDROID)
+ set_property(TARGET accelbubble PROPERTY QT_ANDROID_PACKAGE_SOURCE_DIR
+ ${CMAKE_CURRENT_SOURCE_DIR}/android)
+ endif()
+if(APPLE)
+ if(IOS)
+ set_property(TARGET accelbubble PROPERTY
+ MACOSX_BUNDLE_INFO_PLIST "${CMAKE_CURRENT_SOURCE_DIR}/Info.plist"
+ )
+ endif()
+endif()
+
target_link_libraries(accelbubble PUBLIC
Qt::Core
Qt::Gui
@@ -31,7 +44,6 @@ target_link_libraries(accelbubble PUBLIC
Qt::Xml
)
-
# Resources:
set(accelbubble_resource_files
"accelbubble.qml"
diff --git a/examples/sensors/maze/CMakeLists.txt b/examples/sensors/maze/CMakeLists.txt
index 88334a3c..956047d0 100644
--- a/examples/sensors/maze/CMakeLists.txt
+++ b/examples/sensors/maze/CMakeLists.txt
@@ -22,6 +22,18 @@ set_target_properties(maze PROPERTIES
WIN32_EXECUTABLE TRUE
MACOSX_BUNDLE TRUE
)
+if(ANDROID)
+ set_property(TARGET maze PROPERTY QT_ANDROID_PACKAGE_SOURCE_DIR
+ ${CMAKE_CURRENT_SOURCE_DIR}/android)
+ endif()
+if(APPLE)
+ if(IOS)
+ set_property(TARGET maze PROPERTY
+ MACOSX_BUNDLE_INFO_PLIST "${CMAKE_CURRENT_SOURCE_DIR}/Info.plist"
+ )
+ endif()
+endif()
+
target_link_libraries(maze PUBLIC
Qt::Core
Qt::Gui
@@ -29,7 +41,6 @@ target_link_libraries(maze PUBLIC
Qt::Sensors
)
-
# Resources:
set(maze_resource_files
"Congratulation.qml"
diff --git a/examples/sensors/sensorsshowcase/CMakeLists.txt b/examples/sensors/sensorsshowcase/CMakeLists.txt
index b034dff6..411630d7 100644
--- a/examples/sensors/sensorsshowcase/CMakeLists.txt
+++ b/examples/sensors/sensorsshowcase/CMakeLists.txt
@@ -24,8 +24,15 @@ set_target_properties(sensorsshowcase PROPERTIES
)
if(ANDROID)
-set_property(TARGET sensorsshowcase APPEND PROPERTY QT_ANDROID_PACKAGE_SOURCE_DIR
- ${CMAKE_CURRENT_SOURCE_DIR}/android)
+ set_property(TARGET sensorsshowcase PROPERTY QT_ANDROID_PACKAGE_SOURCE_DIR
+ ${CMAKE_CURRENT_SOURCE_DIR}/android)
+ endif()
+if(APPLE)
+ if(IOS)
+ set_property(TARGET sensorsshowcase PROPERTY
+ MACOSX_BUNDLE_INFO_PLIST "${CMAKE_CURRENT_SOURCE_DIR}/Info.plist"
+ )
+ endif()
endif()
target_link_libraries(sensorsshowcase PUBLIC