MacOS: Support development certificates through CMake

This commit is contained in:
Ty 2025-01-30 10:51:07 -05:00
parent bf8693a7e8
commit 0887002ad4
No known key found for this signature in database
GPG Key ID: A0C3085FE2160BCF
2 changed files with 23 additions and 0 deletions

View File

@ -1347,11 +1347,24 @@ function(setup_main_executable target)
set_target_properties(${target} PROPERTIES set_target_properties(${target} PROPERTIES
MACOSX_BUNDLE true MACOSX_BUNDLE true
MACOSX_BUNDLE_INFO_PLIST "${PCSX2_SOURCE_DIR}/Resources/Info.plist.in" 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 OUTPUT_NAME PCSX2
# Fixes complaints when Xcode tries to sign for running locally about MoltenVK not being signed # Fixes complaints when Xcode tries to sign for running locally about MoltenVK not being signed
XCODE_ATTRIBUTE_OTHER_CODE_SIGN_FLAGS --deep 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) pcsx2_resource(${target} ${PCSX2_SOURCE_DIR}/Resources/PCSX2.icns ${PCSX2_SOURCE_DIR}/Resources)
# Copy shaderc into the bundle # Copy shaderc into the bundle

View File

@ -0,0 +1,10 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>com.apple.security.cs.allow-jit</key>
<true/>
<key>com.apple.security.device.audio-input</key>
<true/>
</dict>
</plist>