From 898a66aa1419ab2b213123751d67f97d1cf9e7e2 Mon Sep 17 00:00:00 2001 From: Leon Styhre Date: Wed, 7 Apr 2021 00:39:12 +0200 Subject: [PATCH] (macOS) Enabled code signing, including Hardened Runtime if on macOS 10.14 or later. --- CMakeLists.txt | 6 ++++++ es-app/CMakeLists.txt | 5 +++++ 2 files changed, 11 insertions(+) diff --git a/CMakeLists.txt b/CMakeLists.txt index 37266750c..ebecbfb47 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -156,6 +156,12 @@ if(APPLE) SET(CMAKE_CXX_ARCHIVE_FINISH " -no_warning_for_no_symbols -c ") 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. diff --git a/es-app/CMakeLists.txt b/es-app/CMakeLists.txt index c845e7378..b402b77fd 100644 --- a/es-app/CMakeLists.txt +++ b/es-app/CMakeLists.txt @@ -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: ") + #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}")