xcode 13将配置文件通过cmake添加到可执行文件目录,对应copy files的executables目录时,编译时会报如下错误:
CodeSign /Users/cp1/code/cp1_client/.release/build_cp1/CPClient/Release/CPClient.app (in target 'CPClient' from project 'CPClient')
cd /Users/cp1/code/cp1_client
Signing Identity: "-"
/usr/bin/codesign --force --sign - --entitlements /Users/cp1/code/cp1_client/.release/build_cp1/CPClient/CPClient.build/Release/CPClient.build/CPClient.app.xcent --timestamp\=none --generate-entitlement-der /Users/cp1/code/cp1_client/.release/build_cp1/CPClient/Release/CPClient.app
/Users/cp1/code/cp1_client/.release/build_cp1/CPClient/Release/CPClient.app: code object is not signed at all
In subcomponent: /Users/cp1/code/cp1_client/.release/build_cp1/CPClient/Release/CPClient.app/Contents/MacOS/PluginSetting.xml
Command CodeSign failed with a nonzero exit code
解决办法:
build settings->all->Other code signing flags 下添加 --deep 选项