1
0
mirror of https://github.com/vcmi/vcmi.git synced 2025-01-02 00:10:22 +02:00

[macOS] perform ad-hoc codesigning

This commit is contained in:
Andrey Filipenkov 2022-09-13 15:27:44 +03:00 committed by Andrii Danylchenko
parent d67d8a003e
commit 5637cdbe3f
2 changed files with 24 additions and 0 deletions

View File

@ -44,6 +44,20 @@ if(APPLE)
) )
file(REMOVE \"${bundleContentsDir}/conan_imports_manifest.txt\") file(REMOVE \"${bundleContentsDir}/conan_imports_manifest.txt\")
") ")
# perform ad-hoc codesigning
set(codesignCommand "codesign --verbose=4 --force --options=runtime --timestamp=none --sign -")
set(codesignCommandWithEntitlements "${codesignCommand} --entitlements \"${CMAKE_SOURCE_DIR}/osx/entitlements.plist\"")
install(CODE "
execute_process(COMMAND
${codesignCommand} \"${bundleContentsDir}/MacOS/vcmibuilder\"
)
foreach(executable vcmiclient vcmiserver vcmilauncher)
execute_process(COMMAND
${codesignCommandWithEntitlements} \"${bundleContentsDir}/MacOS/\${executable}\"
)
endforeach()
")
endif(APPLE) endif(APPLE)
# This will likely only work for Vcpkg # This will likely only work for Vcpkg

10
osx/entitlements.plist Normal file
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.disable-library-validation</key>
<true/>
<key>com.apple.security.get-task-allow</key>
<true/>
</dict>
</plist>