summaryrefslogtreecommitdiffstats
path: root/cmake/QtConfig.cmake.in
diff options
context:
space:
mode:
authorAlexandru Croitor <alexandru.croitor@qt.io>2021-04-14 18:16:44 +0200
committerAlexandru Croitor <alexandru.croitor@qt.io>2021-04-19 20:30:45 +0200
commit4d838dae5a821e9e5f013ba1d5a494ece1b5180e (patch)
treeb02a79358b07649abd58710885f7c113f91d3ee1 /cmake/QtConfig.cmake.in
parentb25eb6e0bd1e3b91c44dc4892d529b95c8677889 (diff)
CMake: Generate better Xcode iOS projects
Add an iOS specific plist file like we do for macOS. If the user hasn't specified a bundle identifier or a development team id, do what qmake does and query the Xcode preferences file to pre-populate those if possible. This allows running cmake -GXcode ./foo on a Qt example project and building it with xcodebuild on the command line without having to go through the IDE to set a development team id or modifying the example project to add a product bundle identifier. Note that the change assumes that the development team id has been previously set / configured via Xcode. If no such id is found, then the value will not be set and the user will still have to specify it either in the project file or via the Xcode UI after the project has been generated. Amends 3a2fa3fec5a43d30f1a93a8e89e2973f23ee4ef3 Pick-to: 6.1 Change-Id: Iaab4e57de72c9877fb9035d28f9a879b2c91a33c Reviewed-by: Cristian Adam <cristian.adam@qt.io>
Diffstat (limited to 'cmake/QtConfig.cmake.in')
-rw-r--r--cmake/QtConfig.cmake.in3
1 files changed, 3 insertions, 0 deletions
diff --git a/cmake/QtConfig.cmake.in b/cmake/QtConfig.cmake.in
index 00121013b2..451d4191a7 100644
--- a/cmake/QtConfig.cmake.in
+++ b/cmake/QtConfig.cmake.in
@@ -44,6 +44,9 @@ list(APPEND CMAKE_MODULE_PATH "${_qt_import_prefix}/3rdparty/kwin")
if(APPLE AND (NOT CMAKE_SYSTEM_NAME OR CMAKE_SYSTEM_NAME STREQUAL "Darwin"))
# Add module directory to pick up custom Info.plist template for macOS
list(APPEND CMAKE_MODULE_PATH "${_qt_import_prefix}/macos")
+elseif(APPLE AND CMAKE_SYSTEM_NAME STREQUAL "iOS")
+ # Add module directory to pick up custom Info.plist template for iOS
+ list(APPEND CMAKE_MODULE_PATH "${_qt_import_prefix}/ios")
endif()
set(QT_ADDITIONAL_PACKAGES_PREFIX_PATH "" CACHE STRING "Additional directories where find(Qt6 ...) components are searched")