QT_EXCLUDE_From_TRANSLATION
이 속성은 Qt 6.7에 도입되었습니다.
이 디렉터리 속성을 ON
로 설정하면 디렉터리와 그 하위 디렉터리의 모든 대상을 번역에서 제외할 수 있습니다. qt_collect_translation_source_targets 명령은 이러한 대상을 건너뜁니다.
단일 대상을 제외하려면 대상 속성 QT_EXCLUDE_FROM_TRANSLATION을 사용합니다.
예제
다음 예제에서는 tests
디렉터리에 정의된 대상에서 번역 가능한 문자열을 추출하지 않습니다.
add_subdirectory(app) add_subdirectory(tests) set_property(DIRECTORY tests PROPERTY QT_EXCLUDE_FROM_TRANSLATION ON) qt_add_translations(myapp)
또는 tests
하위 디렉터리의 CMakeLists.txt
에서 디렉터리 속성을 설정할 수 있습니다.
# tests/CMakeLists.txt qt_add_executable(...) add_test(...) set_directory_properties(PROPERTIES QT_EXCLUDE_FROM_TRANSLATION ON)
© 2025 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.