diff --git a/pcsx2/CMakeLists.txt b/pcsx2/CMakeLists.txt index d99c68fb27..252c6997b3 100644 --- a/pcsx2/CMakeLists.txt +++ b/pcsx2/CMakeLists.txt @@ -1347,11 +1347,24 @@ function(setup_main_executable target) set_target_properties(${target} PROPERTIES MACOSX_BUNDLE true MACOSX_BUNDLE_INFO_PLIST "${PCSX2_SOURCE_DIR}/Resources/Info.plist.in" + XCODE_ATTRIBUTE_CODE_SIGN_ENTITLEMENTS "${PCSX2_SOURCE_DIR}/Resources/PCSX2.entitlements" OUTPUT_NAME PCSX2 # Fixes complaints when Xcode tries to sign for running locally about MoltenVK not being signed XCODE_ATTRIBUTE_OTHER_CODE_SIGN_FLAGS --deep ) + if(MACOS_SIGN_APP) + if(NOT DEFINED ENV{DEVELOPMENT_TEAM}) + message(FATAL_ERROR "You must set the DEVELOPMENT_TEAM environment variable to sign the app.") + endif() + set_target_properties(${target} PROPERTIES + # The "Organizational Unit" field in the certificate + # _not_ the ID in the certificate name + XCODE_ATTRIBUTE_DEVELOPMENT_TEAM "$ENV{DEVELOPMENT_TEAM}" + XCODE_ATTRIBUTE_CODE_SIGN_IDENTITY "Apple Development" + ) + endif() + pcsx2_resource(${target} ${PCSX2_SOURCE_DIR}/Resources/PCSX2.icns ${PCSX2_SOURCE_DIR}/Resources) # Copy shaderc into the bundle diff --git a/pcsx2/Resources/PCSX2.entitlements b/pcsx2/Resources/PCSX2.entitlements new file mode 100644 index 0000000000..7a94632111 --- /dev/null +++ b/pcsx2/Resources/PCSX2.entitlements @@ -0,0 +1,10 @@ + + + + + com.apple.security.cs.allow-jit + + com.apple.security.device.audio-input + + +