(macOS) Enabled code signing, including Hardened Runtime if on macOS 10.14 or later.

This commit is contained in:
Leon Styhre 2021-04-07 00:39:12 +02:00
parent 118cf30888
commit 898a66aa14
2 changed files with 11 additions and 0 deletions

View file

@ -156,6 +156,12 @@ if(APPLE)
SET(CMAKE_CXX_ARCHIVE_FINISH "<CMAKE_RANLIB> -no_warning_for_no_symbols -c <TARGET>")
endif()
if(APPLE)
if(${CMAKE_OSX_DEPLOYMENT_TARGET} VERSION_GREATER 10.13)
message("-- macOS version 10.14 or higher detected so if code signing is enabled, Hardened Runtime will be used")
endif()
endif()
#---------------------------------------------------------------------------------------------------
# Preprocessor directives.

View file

@ -251,6 +251,11 @@ if(APPLE)
set(CPACK_BUNDLE_NAME "EmulationStation Desktop Edition")
set(CPACK_BUNDLE_ICON "${CMAKE_CURRENT_SOURCE_DIR}/assets/EmulationStation-DE.icns")
set(CPACK_BUNDLE_PLIST "${CMAKE_CURRENT_SOURCE_DIR}/assets/EmulationStation-DE_Info.plist")
# Uncomment the following lines and change to your certificate identity to enable code signing.
#set(CPACK_BUNDLE_APPLE_CERT_APP "Developer ID Application: <identity>")
#if(${CMAKE_OSX_DEPLOYMENT_TARGET} VERSION_GREATER 10.13)
# set(CPACK_BUNDLE_APPLE_CODESIGN_PARAMETER "--deep --force --options runtime")
#endif()
elseif(WIN32)
set(CPACK_GENERATOR "NSIS")
set(CPACK_PACKAGE_FILE_NAME "EmulationStation-DE-${CPACK_PACKAGE_VERSION}-${CPU_ARCHITECTURE}")