diff --git a/osx/CMakeLists.txt b/osx/CMakeLists.txt index 990a0ee15..9c0057da9 100644 --- a/osx/CMakeLists.txt +++ b/osx/CMakeLists.txt @@ -44,6 +44,20 @@ if(APPLE) ) 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) # This will likely only work for Vcpkg diff --git a/osx/entitlements.plist b/osx/entitlements.plist new file mode 100644 index 000000000..c532e2d06 --- /dev/null +++ b/osx/entitlements.plist @@ -0,0 +1,10 @@ + + + + + com.apple.security.cs.disable-library-validation + + com.apple.security.get-task-allow + + +