Specifiying CN of Apple Signing Cert when using CMake
Unsolved
Installation and Deployment
-
wrote on 24 Apr 2025, 08:42 last edited by
My Apple Developer ID certificate has:
CN=Developer ID Application: David Partridge (VH8AYT3C7Y)
If the CMakeLists for my Qt project reads like this:if(NOT LINUX) set (deploy_tool_options_arg "") if(APPLE) set(deploy_tool_options_arg "${deploy_tool_options_arg} -hardened-runtime -no-strip") set(deploy_tool_options_arg "${deploy_tool_options_arg} -codesign=Developer ID Application: David Partridge (VH8AYT3C7Y)") endif()
Then it runs macdeployqt like this:
'/opt/Qt/6.8.2/macos/bin/macdeployqt' '/Users/amonra/.vs/DSS/out/build/DeepSkyStacker/DeepSkyStacker.app' '-appstore-compliant' '-always-overwrite' '-hardened-runtime' '-no-strip' '-codesign=Developer' 'ID' 'Application:' 'David' 'Partridge' '(' 'VH8AYT3C7Y' ')'
which isn't correct :(
If I write
-codesign=\"Developer ID Application: David Partridge (VH8AYT3C7Y)\""
Then when I report what deploy_tool_options_arg is I see:
1> [CMake] deploy tools options arg: -verbose=3 -hardened-runtime -no-strip -codesign="Developer ID Application: David Partridge (VH8AYT3C7Y)"
But I when I run the Install I get (split across multiple lines for readability:
-- Running Qt deploy tool for /Users/amonra/.vs/DSS/out/build/DeepSkyStacker/DeepSkyStacker.app in working directory '/Users/amonra/.vs/DSS/Darwin/arm64/Debug' '/opt/Qt/6.8.2/macos/bin/macdeployqt' '/Users/amonra/.vs/DSS/out/build/DeepSkyStacker/DeepSkyStacker.app' '-appstore-compliant' '-always-overwrite' '-verbose=3' '-hardened-runtime' '-no-strip' '-codesign=' 'Developer ID Application: David Partridge (VH8AYT3C7Y)'
Which is incorrect and codesign tells me correctly:
ERROR: Codesign signing error: ERROR: ": no identity found\n"
So what is the correct way to do this please?
1/1