diff options
author | Doris Verria <doris.verria@qt.io> | 2021-08-18 20:00:08 +0200 |
---|---|---|
committer | Qt Cherry-pick Bot <cherrypick_bot@qt-project.org> | 2021-08-19 11:05:01 +0000 |
commit | effba6b6bca7efbc2bacd5a6b57b5a097792c41a (patch) | |
tree | 8df97a10bdae7d555e328ebf60ac94a25948dc7f /examples | |
parent | dd49b60f636476dad8946ed91364dbe7d26e8527 (diff) |
Recorder example: Build as app bundle on macOS/iOS
Add an Info.plist file for camera and microphone usage too.
Change-Id: Ia1fafec2f01dcb1c3d85ce6efcc642fc9d5216b8
Reviewed-by: Piotr Srebrny <piotr.srebrny@qt.io>
Reviewed-by: Lars Knoll <lars.knoll@qt.io>
(cherry picked from commit 1b7f5a052dd4972e19748d3831b60788ff56aadb)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
Diffstat (limited to 'examples')
-rw-r--r-- | examples/multimedia/video/recorder/CMakeLists.txt | 5 | ||||
-rw-r--r-- | examples/multimedia/video/recorder/Info.plist.in | 46 |
2 files changed, 51 insertions, 0 deletions
diff --git a/examples/multimedia/video/recorder/CMakeLists.txt b/examples/multimedia/video/recorder/CMakeLists.txt index b01a23ca3..e885d0abe 100644 --- a/examples/multimedia/video/recorder/CMakeLists.txt +++ b/examples/multimedia/video/recorder/CMakeLists.txt @@ -27,3 +27,8 @@ target_compile_definitions(recorder PRIVATE $<$<OR:$<CONFIG:Debug>,$<CONFIG:RelWithDebInfo>>:QT_QML_DEBUG>) target_link_libraries(recorder PRIVATE Qt6::Core Qt6::Quick Qt6::Multimedia) + +set_target_properties(recorder PROPERTIES + MACOSX_BUNDLE TRUE + MACOSX_BUNDLE_INFO_PLIST ${CMAKE_CURRENT_SOURCE_DIR}/Info.plist.in +) diff --git a/examples/multimedia/video/recorder/Info.plist.in b/examples/multimedia/video/recorder/Info.plist.in new file mode 100644 index 000000000..46a9ecf2d --- /dev/null +++ b/examples/multimedia/video/recorder/Info.plist.in @@ -0,0 +1,46 @@ +<?xml version="1.0" encoding="UTF-8"?> +<!DOCTYPE plist PUBLIC "-//Apple Computer//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd"> +<plist version="1.0"> +<dict> + <key>CFBundleInfoDictionaryVersion</key> + <string>6.0</string> + <key>CFBundlePackageType</key> + <string>APPL</string> + + <key>CFBundleName</key> + <string>${MACOSX_BUNDLE_BUNDLE_NAME}</string> + <key>CFBundleIdentifier</key> + <string>${MACOSX_BUNDLE_GUI_IDENTIFIER}</string> + <key>CFBundleExecutable</key> + <string>${MACOSX_BUNDLE_EXECUTABLE_NAME}</string> + + <key>CFBundleVersion</key> + <string>${MACOSX_BUNDLE_BUNDLE_VERSION}</string> + <key>CFBundleShortVersionString</key> + <string>${MACOSX_BUNDLE_SHORT_VERSION_STRING}</string> + <key>CFBundleLongVersionString</key> + <string>${MACOSX_BUNDLE_LONG_VERSION_STRING}</string> + + <key>LSMinimumSystemVersion</key> + <string>${CMAKE_OSX_DEPLOYMENT_TARGET}</string> + + <key>CFBundleGetInfoString</key> + <string>${MACOSX_BUNDLE_INFO_STRING}</string> + <key>NSHumanReadableCopyright</key> + <string>${MACOSX_BUNDLE_COPYRIGHT}</string> + + <key>CFBundleIconFile</key> + <string>${MACOSX_BUNDLE_ICON_FILE}</string> + + <key>CFBundleDevelopmentRegion</key> + <string>English</string> + + <key>NSCameraUsageDescription</key> + <string>Qt Multimedia Example</string> + <key>NSMicrophoneUsageDescription</key> + <string>Qt Multimedia Example</string> + + <key>NSSupportsAutomaticGraphicsSwitching</key> + <true/> +</dict> +</plist> |