From 1891ed96bf3bbaeee162a5c073ee14bd811a8ba8 Mon Sep 17 00:00:00 2001 From: Artem Dyomin Date: Thu, 1 Dec 2022 12:10:52 +0100 Subject: Fix audio example for macos In order to ask microphone or camera permissions on apple platforms we should define info.plist file in cmake Task-number: QTBUG-108018 Pick-to: 6.4 Change-Id: Ie2e138f5d3c1e0527d89c8ef1b667c4f07395411 Reviewed-by: Doris Verria --- examples/charts/audio/CMakeLists.txt | 1 + examples/charts/audio/apple/Info.plist.in | 13 +++++++++++++ 2 files changed, 14 insertions(+) create mode 100644 examples/charts/audio/apple/Info.plist.in diff --git a/examples/charts/audio/CMakeLists.txt b/examples/charts/audio/CMakeLists.txt index 65e20282..d8f11e0d 100644 --- a/examples/charts/audio/CMakeLists.txt +++ b/examples/charts/audio/CMakeLists.txt @@ -23,6 +23,7 @@ qt_add_executable(audio set_target_properties(audio PROPERTIES WIN32_EXECUTABLE TRUE MACOSX_BUNDLE TRUE + MACOSX_BUNDLE_INFO_PLIST "${CMAKE_CURRENT_SOURCE_DIR}/apple/Info.plist.in" ) target_link_libraries(audio PUBLIC diff --git a/examples/charts/audio/apple/Info.plist.in b/examples/charts/audio/apple/Info.plist.in new file mode 100644 index 00000000..9e6cc252 --- /dev/null +++ b/examples/charts/audio/apple/Info.plist.in @@ -0,0 +1,13 @@ + + + + + CFBundleInfoDictionaryVersion + 6.0 + CFBundlePackageType + APPL + + NSMicrophoneUsageDescription + Qt Charts Example + + -- cgit v1.2.3