From fa8e9a39bfbffaa23200a88bb700e86490389183 Mon Sep 17 00:00:00 2001 From: Doris Verria Date: Wed, 16 Mar 2022 14:07:59 +0100 Subject: Remove the code-signing step from examples MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Codesigning with entitlements is not needed unless the hardened-runtime option is enabled, so we can remove this post-build step. Fixes: QTBUG-101719 Pick-to: 6.3 6.2 6.2.4 Change-Id: I35181220dbe4ef6b59072dcd3e76f066ab85db60 Reviewed-by: Lars Knoll Reviewed-by: Tor Arne Vestbø --- examples/multimedia/video/qmlvideo/CMakeLists.txt | 11 ----------- examples/multimedia/video/qmlvideo/qmlvideo.entitlements | 8 -------- examples/multimedia/video/qmlvideo/qmlvideo.pro | 9 --------- examples/multimedia/video/recorder/CMakeLists.txt | 11 ----------- examples/multimedia/video/recorder/recorder.entitlements | 10 ---------- 5 files changed, 49 deletions(-) delete mode 100644 examples/multimedia/video/qmlvideo/qmlvideo.entitlements delete mode 100644 examples/multimedia/video/recorder/recorder.entitlements (limited to 'examples/multimedia/video') diff --git a/examples/multimedia/video/qmlvideo/CMakeLists.txt b/examples/multimedia/video/qmlvideo/CMakeLists.txt index 9ef73b090..071ec9f25 100644 --- a/examples/multimedia/video/qmlvideo/CMakeLists.txt +++ b/examples/multimedia/video/qmlvideo/CMakeLists.txt @@ -24,8 +24,6 @@ set_target_properties(qmlvideo PROPERTIES WIN32_EXECUTABLE TRUE MACOSX_BUNDLE TRUE MACOSX_BUNDLE_INFO_PLIST ${CMAKE_CURRENT_SOURCE_DIR}/Info.plist.in - XCODE_ATTRIBUTE_CODE_SIGN_ENTITLEMENTS - "${CMAKE_CURRENT_LIST_DIR}/qmlvideo.entitlements" ) target_compile_definitions(qmlvideo PUBLIC @@ -118,12 +116,3 @@ install(TARGETS qmlvideo BUNDLE DESTINATION "${INSTALL_EXAMPLEDIR}" LIBRARY DESTINATION "${INSTALL_EXAMPLEDIR}" ) - -if(APPLE AND NOT IOS) - if(NOT CMAKE_GENERATOR STREQUAL "Xcode") - add_custom_command(TARGET qmlvideo - POST_BUILD - COMMAND codesign --sign - --entitlements ${CMAKE_CURRENT_SOURCE_DIR}/qmlvideo.entitlements ${CMAKE_CURRENT_BINARY_DIR}/qmlvideo.app - ) - endif() -endif() diff --git a/examples/multimedia/video/qmlvideo/qmlvideo.entitlements b/examples/multimedia/video/qmlvideo/qmlvideo.entitlements deleted file mode 100644 index 6cfee69ba..000000000 --- a/examples/multimedia/video/qmlvideo/qmlvideo.entitlements +++ /dev/null @@ -1,8 +0,0 @@ - - - - - com.apple.security.device.camera - - - diff --git a/examples/multimedia/video/qmlvideo/qmlvideo.pro b/examples/multimedia/video/qmlvideo/qmlvideo.pro index 7d5717c3c..7a6bbccff 100644 --- a/examples/multimedia/video/qmlvideo/qmlvideo.pro +++ b/examples/multimedia/video/qmlvideo/qmlvideo.pro @@ -86,12 +86,3 @@ EXAMPLE_FILES += \ qmlvideo.png \ qmlvideo.svg -macos { - macx-xcode { - code_sign_entitlements.name = CODE_SIGN_ENTITLEMENTS - code_sign_entitlements.value = $$PWD/$${TARGET}.entitlements - QMAKE_MAC_XCODE_SETTINGS += code_sign_entitlements - } else { - QMAKE_POST_LINK += "codesign --sign - --entitlements $$PWD/$${TARGET}.entitlements $${OUT_PWD}/$${TARGET}.app" - } -} diff --git a/examples/multimedia/video/recorder/CMakeLists.txt b/examples/multimedia/video/recorder/CMakeLists.txt index 63036e7b2..33331b329 100644 --- a/examples/multimedia/video/recorder/CMakeLists.txt +++ b/examples/multimedia/video/recorder/CMakeLists.txt @@ -56,19 +56,8 @@ target_link_libraries(recorder set_target_properties(recorder PROPERTIES MACOSX_BUNDLE TRUE MACOSX_BUNDLE_INFO_PLIST ${CMAKE_CURRENT_SOURCE_DIR}/Info.plist.in - XCODE_ATTRIBUTE_CODE_SIGN_ENTITLEMENTS - "${CMAKE_CURRENT_LIST_DIR}/recorder.entitlements" ) -if(APPLE AND NOT IOS) - if(NOT CMAKE_GENERATOR STREQUAL "Xcode") - add_custom_command(TARGET recorder - POST_BUILD - COMMAND codesign --sign - --entitlements ${CMAKE_CURRENT_SOURCE_DIR}/recorder.entitlements ${CMAKE_CURRENT_BINARY_DIR}/recorder.app - ) - endif() -endif() - install(TARGETS recorder RUNTIME DESTINATION "${INSTALL_EXAMPLEDIR}" BUNDLE DESTINATION "${INSTALL_EXAMPLEDIR}" diff --git a/examples/multimedia/video/recorder/recorder.entitlements b/examples/multimedia/video/recorder/recorder.entitlements deleted file mode 100644 index 97c1f6d58..000000000 --- a/examples/multimedia/video/recorder/recorder.entitlements +++ /dev/null @@ -1,10 +0,0 @@ - - - - - com.apple.security.device.audio-input - - com.apple.security.device.camera - - - -- cgit v1.2.3