qt_deploy_qt_conf
배포 시 qt.conf 파일을 작성합니다.
이 명령은 Qt6
패키지의 Core
컴포넌트에 정의되어 있으며, 다음과 같이 로드할 수 있습니다:
find_package(Qt6 REQUIRED COMPONENTS Core)
Qt에서 제공하는 대부분의 다른 CMake 명령과 달리 qt_deploy_qt_conf()
은 배포 스크립트에서만 호출할 수 있습니다. 프로젝트에서 직접 호출할 수 없습니다.
이 명령은 Qt 6.3에 도입되었습니다.
참고: 이 명령은 일반적으로 직접 호출할 필요가 없습니다. 다른 상위 레벨 명령에서 내부적으로 사용되지만, 보다 사용자 정의된 배포 로직을 구현하려는 프로젝트에서는 유용할 수 있습니다.
시놉시스
qt_deploy_qt_conf(file_path [PREFIX prefix] [DOC_DIR doc_dir] [HEADERS_DIR headers_dir] [LIB_DIR lib_dir] [LIBEXEC_DIR libexec_dir] [BIN_DIR bin_dir] [PLUGINS_DIR plugins_dir] [QML_DIR qml_dir] [ARCHDATA_DIR archdata_dir] [DATA_DIR data_dir] [TRANSLATIONS_DIR translations_dir] [EXAMPLES_DIR examples_dir] [TESTS_DIR test_dir] [SETTINGS_DIR settings_dir] )
설명
배포 중에 qt.conf 파일을 생성해야 할 때 이 명령을 사용합니다. qt.conf
에서 지원하는 모든 경로의 기본값은 해당 ..._DIR
옵션으로 재정의할 수 있습니다. 이 명령은 생성된 qt.conf
파일의 경로가 기본값과 다른 경우에만 경로를 작성합니다. 기본값은 경로 재정의에서 확인할 수 있습니다.
file_path
인수는 qt.conf
파일이 쓰여질 위치에 대한 절대 경로를 기대합니다. 아래 예시와 같이 QT_DEPLOY_PREFIX 및 QT_DEPLOY_BIN_DIR 변수를 사용하여 배포 바이너리 디렉터리에 상대적인 경로를 동적으로 지정할 수 있습니다. 이렇게 하면 절대 경로를 하드코딩하지 않아도 됩니다.
예제
# The following script must only be executed at install time qt_generate_deploy_script( OUTPUT_SCRIPT deploy_script CONTENT " qt_deploy_qt_conf(\"\${QT_DEPLOY_PREFIX}/\${QT_DEPLOY_BIN_DIR}/qt.conf\" DATA_DIR \"./custom_data_dir\" TRANSLATIONS_DIR \"./custom_translations_dir\" ) ") install(SCRIPT ${deploy_script})
qt_generate_deploy_app_script() 및 qt_deploy_runtime_dependencies()도 참조하십시오 .
© 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.