QTP0007
생성된 배포 스크립트에서 인자 값을 따옴표와 이스케이프 문자로 감쌉니다.
이 정책은 Qt 6.12에서 도입되었습니다. 이 정책은 qt_generate_deploy_app_script() 가 DEPLOY_TOOL_OPTIONS, PRE_EXCLUDE_REGEXES, POST_EXCLUDE_FILES 와 같이 qt_deploy_runtime_dependencies()로 전달하는 키워드의 값을 생성된 배포 스크립트에 어떻게 기록하는지에 영향을 미칩니다.
정책이 OLD 로 설정된 경우, 값은 따옴표 없이 기록됩니다. 생성된 스크립트가 실행되면 CMake는 각 값을 공백으로 분할하고, 그 안의 백슬래시를 이스케이프 시퀀스로 해석합니다. 이로 인해 공백, 백슬래시 또는 큰따옴표를 포함하는 값에서 문제가 발생합니다.
정책이 ` NEW`로 설정된 경우, 각 값은 백슬래시와 큰따옴표가 이스케이프 처리된 상태로 따옴표로 묶인 인자로 출력되므로, 값이 변경되지 않은 채 ` qt_deploy_runtime_dependencies() `에 전달됩니다.
정책이 설정되지 않은 상태에서 전달된 값에 공백, 백슬래시 또는 큰따옴표가 포함되어 있으면, 하위 호환성을 위해 AUTHOR_WARNING 이 발생하고 값은 따옴표 없이 기록됩니다. 이러한 문자가 포함되지 않은 값은 영향을 받지 않으므로, 이에 대해서는 경고가 발생하지 않습니다.
예를 들어, 공백이 포함된 코드 서명 ID의 경우:
# QTP0007 not set - AUTHOR_WARNING is emitted
qt_generate_deploy_app_script(
TARGET MyApp
OUTPUT_SCRIPT deploy_script
DEPLOY_TOOL_OPTIONS "-codesign=Developer ID Application: Foo"
)이 식별자는 여러 개의 인수로 macdeployqt 에 전달되며, 코드 서명 단계에서 잘못된 식별자를 선택하거나 실패하게 됩니다. 정책을 NEW 로 설정하면 단일 인수로 전달됩니다:
qt_policy(SET QTP0007 NEW)
qt_generate_deploy_app_script(
TARGET MyApp
OUTPUT_SCRIPT deploy_script
DEPLOY_TOOL_OPTIONS "-codesign=Developer ID Application: Foo"
)여러 옵션을 공백으로 구분된 하나의 값에 포함시킨 프로젝트는 OLD 동작을 이용하여 이를 분할했으므로, 정책이 NEW 로 설정되면 별도의 목록 요소로 전달해야 합니다:
# Relies on the \c OLD behavior to split the value into four options.
set(options "-hardened-runtime -timestamp -appstore-compliant -verbose=3")# Correct way to pass options with the \c NEW behavior.
set(options -hardened-runtime -timestamp -appstore-compliant -verbose=3)참고: 정책의 OLD 동작은 더 이상 권장되지 않으며, 향후 제거될 수 있습니다.
qt_policy(), Qt CMake 정책, qt_generate_deploy_app_script(), qt_deploy_runtime_dependencies()도 참조하십시오 .
© 2026 The Qt Company Ltd. Documentation contributions included herein are the copyrights of their respective owners. The documentation provided herein is licensed under the terms of the GNU Free Documentation License version 1.3 as published by the Free Software Foundation. Qt and respective logos are trademarks of The Qt Company Ltd. in Finland and/or other countries worldwide. All other trademarks are property of their respective owners.