mirror of
https://github.com/vcmi/vcmi.git
synced 2024-12-22 22:13:35 +02:00
[macOS] build properly ordered list of executables that needs to be signed
This commit is contained in:
parent
9865578faa
commit
8e8323a3d5
@ -40,13 +40,23 @@ if(APPLE_MACOS)
|
|||||||
vcmi_install_conan_deps("${bundleContentsDir}")
|
vcmi_install_conan_deps("${bundleContentsDir}")
|
||||||
|
|
||||||
# perform ad-hoc codesigning
|
# perform ad-hoc codesigning
|
||||||
|
set(executablesToSign vcmiserver)
|
||||||
|
if(ENABLE_EDITOR)
|
||||||
|
list(APPEND executablesToSign vcmieditor)
|
||||||
|
endif()
|
||||||
|
# main executable must be last
|
||||||
|
list(APPEND executablesToSign vcmiclient)
|
||||||
|
if(ENABLE_LAUNCHER)
|
||||||
|
list(APPEND executablesToSign vcmilauncher)
|
||||||
|
endif()
|
||||||
|
|
||||||
set(codesignCommand "codesign --verbose=4 --force --options=runtime --timestamp=none --sign -")
|
set(codesignCommand "codesign --verbose=4 --force --options=runtime --timestamp=none --sign -")
|
||||||
set(codesignCommandWithEntitlements "${codesignCommand} --entitlements \"${CMAKE_SOURCE_DIR}/osx/entitlements.plist\"")
|
set(codesignCommandWithEntitlements "${codesignCommand} --entitlements \"${CMAKE_SOURCE_DIR}/osx/entitlements.plist\"")
|
||||||
install(CODE "
|
install(CODE "
|
||||||
execute_process(COMMAND
|
execute_process(COMMAND
|
||||||
${codesignCommand} \"${bundleContentsDir}/MacOS/vcmibuilder\"
|
${codesignCommand} \"${bundleContentsDir}/MacOS/vcmibuilder\"
|
||||||
)
|
)
|
||||||
foreach(executable vcmiclient vcmiserver vcmilauncher)
|
foreach(executable ${executablesToSign})
|
||||||
execute_process(COMMAND
|
execute_process(COMMAND
|
||||||
${codesignCommandWithEntitlements} \"${bundleContentsDir}/MacOS/\${executable}\"
|
${codesignCommandWithEntitlements} \"${bundleContentsDir}/MacOS/\${executable}\"
|
||||||
)
|
)
|
||||||
|
Loading…
Reference in New Issue
Block a user