diff options
author | Doris Verria <doris.verria@qt.io> | 2022-03-16 14:07:59 +0100 |
---|---|---|
committer | Qt Cherry-pick Bot <cherrypick_bot@qt-project.org> | 2022-03-17 21:17:00 +0000 |
commit | 0790918ef8d0dc863aefeaa190250ba948a26904 (patch) | |
tree | e3858c2b619fda2f7efb68f277f83879a9367a43 | |
parent | fbac328fe9ff787049a779f93f51ed5bb35e5093 (diff) |
Remove the code-signing step from examples
Codesigning with entitlements is not needed unless the
hardened-runtime option is enabled, so we can remove this
post-build step.
Fixes: QTBUG-101719
Change-Id: I35181220dbe4ef6b59072dcd3e76f066ab85db60
Reviewed-by: Lars Knoll <lars.knoll@qt.io>
Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
(cherry picked from commit fa8e9a39bfbffaa23200a88bb700e86490389183)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
14 files changed, 0 insertions, 131 deletions
diff --git a/examples/multimedia/audiorecorder/CMakeLists.txt b/examples/multimedia/audiorecorder/CMakeLists.txt index 88b540805..55acaa3ab 100644 --- a/examples/multimedia/audiorecorder/CMakeLists.txt +++ b/examples/multimedia/audiorecorder/CMakeLists.txt @@ -22,8 +22,6 @@ set_target_properties(audiorecorder 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}/audiorecorder.entitlements" ) target_include_directories(audiorecorder PUBLIC @@ -49,11 +47,3 @@ install(TARGETS audiorecorder LIBRARY DESTINATION "${INSTALL_EXAMPLEDIR}" ) -if(APPLE AND NOT IOS) - if(NOT CMAKE_GENERATOR STREQUAL "Xcode") - add_custom_command(TARGET audiorecorder - POST_BUILD - COMMAND codesign --sign - --entitlements ${CMAKE_CURRENT_SOURCE_DIR}/audiorecorder.entitlements ${CMAKE_CURRENT_BINARY_DIR}/audiorecorder.app - ) - endif() -endif() diff --git a/examples/multimedia/audiorecorder/audiorecorder.entitlements b/examples/multimedia/audiorecorder/audiorecorder.entitlements deleted file mode 100644 index b572d9c04..000000000 --- a/examples/multimedia/audiorecorder/audiorecorder.entitlements +++ /dev/null @@ -1,8 +0,0 @@ -<?xml version="1.0" encoding="UTF-8"?> -<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd"> -<plist version="1.0"> -<dict> - <key>com.apple.security.device.audio-input</key> - <true/> -</dict> -</plist> diff --git a/examples/multimedia/audiorecorder/audiorecorder.pro b/examples/multimedia/audiorecorder/audiorecorder.pro index 5de038410..a0e05cc03 100644 --- a/examples/multimedia/audiorecorder/audiorecorder.pro +++ b/examples/multimedia/audiorecorder/audiorecorder.pro @@ -22,12 +22,3 @@ INSTALLS += target QT+=widgets include(../shared/shared.pri) -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/declarative-camera/CMakeLists.txt b/examples/multimedia/declarative-camera/CMakeLists.txt index 1ca30c525..50f5986ec 100644 --- a/examples/multimedia/declarative-camera/CMakeLists.txt +++ b/examples/multimedia/declarative-camera/CMakeLists.txt @@ -19,8 +19,6 @@ set_target_properties(declarative-camera 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}/declarative-camera.entitlements" ) target_include_directories(declarative-camera PUBLIC @@ -76,11 +74,3 @@ install(TARGETS declarative-camera LIBRARY DESTINATION "${INSTALL_EXAMPLEDIR}" ) -if(APPLE AND NOT IOS) - if(NOT CMAKE_GENERATOR STREQUAL "Xcode") - add_custom_command(TARGET declarative-camera - POST_BUILD - COMMAND codesign --sign - --entitlements ${CMAKE_CURRENT_SOURCE_DIR}/declarative-camera.entitlements ${CMAKE_CURRENT_BINARY_DIR}/declarative-camera.app - ) - endif() -endif() diff --git a/examples/multimedia/declarative-camera/declarative-camera.entitlements b/examples/multimedia/declarative-camera/declarative-camera.entitlements deleted file mode 100644 index 6cfee69ba..000000000 --- a/examples/multimedia/declarative-camera/declarative-camera.entitlements +++ /dev/null @@ -1,8 +0,0 @@ -<?xml version="1.0" encoding="UTF-8"?> -<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd"> -<plist version="1.0"> -<dict> - <key>com.apple.security.device.camera</key> - <true/> -</dict> -</plist> diff --git a/examples/multimedia/declarative-camera/declarative-camera.pro b/examples/multimedia/declarative-camera/declarative-camera.pro index 58bb9d76c..621342b39 100644 --- a/examples/multimedia/declarative-camera/declarative-camera.pro +++ b/examples/multimedia/declarative-camera/declarative-camera.pro @@ -10,12 +10,3 @@ target.path = $$[QT_INSTALL_EXAMPLES]/multimedia/declarative-camera INSTALLS += target include(../shared/shared.pri) -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/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 @@ -<?xml version="1.0" encoding="UTF-8"?> -<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd"> -<plist version="1.0"> -<dict> - <key>com.apple.security.device.camera</key> - <true/> -</dict> -</plist> 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 @@ -<?xml version="1.0" encoding="UTF-8"?> -<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd"> -<plist version="1.0"> -<dict> - <key>com.apple.security.device.audio-input</key> - <true/> - <key>com.apple.security.device.camera</key> - <true/> -</dict> -</plist> diff --git a/examples/multimediawidgets/camera/CMakeLists.txt b/examples/multimediawidgets/camera/CMakeLists.txt index ebcac8159..ee70fd693 100644 --- a/examples/multimediawidgets/camera/CMakeLists.txt +++ b/examples/multimediawidgets/camera/CMakeLists.txt @@ -39,15 +39,7 @@ set_target_properties(camera PROPERTIES if(APPLE AND NOT IOS) set_target_properties(camera PROPERTIES MACOSX_BUNDLE_INFO_PLIST "${CMAKE_CURRENT_SOURCE_DIR}/macos/Info.plist.in" - XCODE_ATTRIBUTE_CODE_SIGN_ENTITLEMENTS - "${CMAKE_CURRENT_LIST_DIR}/camera.entitlements" ) - if(NOT CMAKE_GENERATOR STREQUAL "Xcode") - add_custom_command(TARGET camera - POST_BUILD - COMMAND codesign --sign - --entitlements ${CMAKE_CURRENT_SOURCE_DIR}/camera.entitlements ${CMAKE_CURRENT_BINARY_DIR}/camera.app - ) - endif() elseif(IOS) set_target_properties(camera PROPERTIES MACOSX_BUNDLE_INFO_PLIST "${CMAKE_CURRENT_SOURCE_DIR}/ios/Info.plist.in" diff --git a/examples/multimediawidgets/camera/camera.entitlements b/examples/multimediawidgets/camera/camera.entitlements deleted file mode 100644 index 97c1f6d58..000000000 --- a/examples/multimediawidgets/camera/camera.entitlements +++ /dev/null @@ -1,10 +0,0 @@ -<?xml version="1.0" encoding="UTF-8"?> -<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd"> -<plist version="1.0"> -<dict> - <key>com.apple.security.device.audio-input</key> - <true/> - <key>com.apple.security.device.camera</key> - <true/> -</dict> -</plist> diff --git a/examples/multimediawidgets/camera/camera.pro b/examples/multimediawidgets/camera/camera.pro index 87590cb2b..e1d98c06e 100644 --- a/examples/multimediawidgets/camera/camera.pro +++ b/examples/multimediawidgets/camera/camera.pro @@ -38,13 +38,3 @@ include(../../multimedia/shared/shared.pri) ANDROID_PACKAGE_SOURCE_DIR = $$PWD/android OTHER_FILES += android/AndroidManifest.xml - -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" - } -} |