aboutsummaryrefslogtreecommitdiff
path: root/cmake
diff options
context:
space:
mode:
Diffstat (limited to 'cmake')
-rw-r--r--cmake/scripts/osx/Install.cmake19
1 files changed, 18 insertions, 1 deletions
diff --git a/cmake/scripts/osx/Install.cmake b/cmake/scripts/osx/Install.cmake
index aca31b47c9..629bc09cd3 100644
--- a/cmake/scripts/osx/Install.cmake
+++ b/cmake/scripts/osx/Install.cmake
@@ -30,12 +30,29 @@ add_dependencies(bundle ${APP_NAME_LC})
configure_file(${CMAKE_SOURCE_DIR}/tools/darwin/packaging/osx/mkdmg-osx.sh.in
${CMAKE_BINARY_DIR}/tools/darwin/packaging/osx/mkdmg-osx.sh @ONLY)
+string(TOLOWER ${CORE_BUILD_CONFIG} CORE_BUILD_CONFIG_LOWERCASED)
+if(${CORE_BUILD_CONFIG_LOWERCASED} STREQUAL "release")
+ set(ALLOW_DEBUGGER "false")
+else()
+ set(ALLOW_DEBUGGER "true")
+endif()
+configure_file(${CMAKE_SOURCE_DIR}/tools/darwin/packaging/osx/Kodi.entitlements.in
+ ${CMAKE_BINARY_DIR}/tools/darwin/packaging/osx/Kodi.entitlements @ONLY)
+
add_custom_target(dmg
COMMAND ${CMAKE_COMMAND} -E copy_directory ${CMAKE_SOURCE_DIR}/tools/darwin/packaging/osx/
${CMAKE_BINARY_DIR}/tools/darwin/packaging/osx/
COMMAND ${CMAKE_COMMAND} -E copy_directory ${CMAKE_SOURCE_DIR}/tools/darwin/packaging/media/osx/
${CMAKE_BINARY_DIR}/tools/darwin/packaging/media/osx/
- COMMAND ./mkdmg-osx.sh ${CORE_BUILD_CONFIG}
+ COMMAND ${CMAKE_COMMAND} -E copy ${CMAKE_SOURCE_DIR}/tools/darwin/Support/Codesign.command
+ ${CMAKE_BINARY_DIR}/tools/darwin/packaging/osx/Codesign.command
+ COMMAND "CODESIGNING_FOLDER_PATH=${PACKAGE_OUTPUT_DIR}/${APP_NAME}.app"
+ "DEV_ACCOUNT=${DEV_ACCOUNT}"
+ "DEV_ACCOUNT_PASSWORD=${DEV_ACCOUNT_PASSWORD}"
+ "DEV_TEAM=${DEV_TEAM}"
+ "EXPANDED_CODE_SIGN_IDENTITY_NAME=${CODE_SIGN_IDENTITY}"
+ "PLATFORM_NAME=${PLATFORM}"
+ ./mkdmg-osx.sh ${CORE_BUILD_CONFIG_LOWERCASED}
WORKING_DIRECTORY ${CMAKE_BINARY_DIR}/tools/darwin/packaging/osx)
set_target_properties(dmg PROPERTIES FOLDER "Build Utilities")
add_dependencies(dmg bundle)