diff --git a/cmake/SignMacApplications.cmake b/cmake/SignMacApplications.cmake index 0908f18de..4d0acf88e 100644 --- a/cmake/SignMacApplications.cmake +++ b/cmake/SignMacApplications.cmake @@ -1,25 +1,25 @@ # This script re-signs all apps after CPack packages them. This is necessary because CPack modifies # the library references used by Cockatrice to App relative paths, invalidating the code signature. if(APPLE) - set(APPLICATIONS "cockatrice" "servatrice" "oracle" "dbconverter") - foreach(app_name IN LISTS APPLICATIONS) - set(FULL_APP_PATH "${CPACK_TEMPORARY_INSTALL_DIRECTORY}/${app_name}.app") + set(APPLICATIONS "cockatrice" "servatrice" "oracle" "dbconverter") + foreach(app_name IN LISTS APPLICATIONS) + set(FULL_APP_PATH "${CPACK_TEMPORARY_INSTALL_DIRECTORY}/${app_name}.app") - message(STATUS "Signing Interior Dynamically Loaded Libraries for ${app_name}.app") - execute_process(COMMAND "find" "${FULL_APP_PATH}" "-name" "*.dylib" OUTPUT_VARIABLE INTERIOR_DLLS) - string(REPLACE "\n" ";" INTERIOR_DLLS_LIST ${INTERIOR_DLLS}) + message(STATUS "Signing Interior Dynamically Loaded Libraries for ${app_name}.app") + execute_process(COMMAND "find" "${FULL_APP_PATH}" "-name" "*.dylib" OUTPUT_VARIABLE INTERIOR_DLLS) + string(REPLACE "\n" ";" INTERIOR_DLLS_LIST ${INTERIOR_DLLS}) - foreach(INTERIOR_DLL IN LISTS INTERIOR_DLLS_LIST) - execute_process( - COMMAND "codesign" "--sign" "$ENV{MACOS_CERTIFICATE_NAME}" "--entitlements" ".ci/macos.entitlements" - "--options" "runtime" "--force" "--deep" "--timestamp" "--verbose" "${INTERIOR_DLL}" - ) - endforeach() + foreach(INTERIOR_DLL IN LISTS INTERIOR_DLLS_LIST) + execute_process( + COMMAND "codesign" "--sign" "$ENV{MACOS_CERTIFICATE_NAME}" "--entitlements" ".ci/macos.entitlements" + "--options" "runtime" "--force" "--deep" "--timestamp" "--verbose" "${INTERIOR_DLL}" + ) + endforeach() - message(STATUS "Signing Exterior Applications ${app_name}.app") - execute_process( - COMMAND "codesign" "--sign" "$ENV{MACOS_CERTIFICATE_NAME}" "--entitlements" ".ci/macos.entitlements" "--options" - "runtime" "--force" "--deep" "--timestamp" "--verbose" "${FULL_APP_PATH}" - ) - endforeach() -endif() \ No newline at end of file + message(STATUS "Signing Exterior Applications ${app_name}.app") + execute_process( + COMMAND "codesign" "--sign" "$ENV{MACOS_CERTIFICATE_NAME}" "--entitlements" ".ci/macos.entitlements" "--options" + "runtime" "--force" "--deep" "--timestamp" "--verbose" "${FULL_APP_PATH}" + ) + endforeach() +endif()