Specifying full CN for macdeployqt -codesign

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 I don’t believe to be correct. I think it should invoke it 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)"'
  1. Is that correct?
  2. If so how to change the CMakelists.txt to achieve that?

Thanks, David

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 I am still struggling - help much appreciated.

Can anyone help with this at present it is invoking codesign using -s “Developer” which is searches for a Cert containing “Developer” in the Common Name.

D.