summaryrefslogtreecommitdiffstats
path: root/examples/multimedia/video/recorder/CMakeLists.txt
diff options
context:
space:
mode:
Diffstat (limited to 'examples/multimedia/video/recorder/CMakeLists.txt')
-rw-r--r--examples/multimedia/video/recorder/CMakeLists.txt11
1 files changed, 11 insertions, 0 deletions
diff --git a/examples/multimedia/video/recorder/CMakeLists.txt b/examples/multimedia/video/recorder/CMakeLists.txt
index e885d0abe..a0067cd11 100644
--- a/examples/multimedia/video/recorder/CMakeLists.txt
+++ b/examples/multimedia/video/recorder/CMakeLists.txt
@@ -31,4 +31,15 @@ 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()