qt_import_qml_plugins
이 명령은 Qt 6.0에 도입되었습니다.
개요
qt_import_qml_plugins(target)
버전 없는 명령이 비활성화되어 있으면 대신 qt6_import_qml_plugins()
을 사용합니다. 이 명령과 동일한 인수 집합을 지원합니다.
설명
참고: 이 명령은 Qt가 정적으로 빌드된 경우에만 효과가 있습니다. 정적이 아닌 Qt를 사용하여 호출하면 아무 작업도 수행하지 않고 즉시 반환됩니다.
qt_import_qml_plugins()
는 호출의 일부로 target
에서 qmlimportscanner
을 즉시 실행합니다(QML 모듈을 정의할 때 qt_add_qml_module() 에 NO_IMPORT_SCAN
옵션이 전달되지 않은 경우). target
에서 사용하는 정적 QML 플러그인을 찾아 해당 플러그인에 연결하여 target
이 나타내는 실행 파일 또는 공유 라이브러리의 일부가 되도록 합니다. 검색은 QML 모듈 가져오기를 재귀적으로 따릅니다.
qmlimportscanner
호출은 생성 또는 빌드 시점이 아닌 구성 시점에 실행되므로 qt_import_qml_plugins()
은 target
(또는 링크 또는 가져오기하는 다른 대상)에 기록된 정보만 qt_import_qml_plugins()
호출 시점에 알 수 있습니다. 이 호출 이후에 추가된 모든 연결 또는 가져오기 관계는 고려되지 않습니다. 따라서 이 명령은 target
의 디렉토리 범위에서 가능한 한 늦게 호출하여 모든 링크 및 가져오기 관계를 알 수 있도록 해야 합니다.
target
가 qt_add_executable()을 사용하여 생성된 경우, 프로젝트는 일반적으로 qt_import_qml_plugins()
을 직접 호출할 필요가 없습니다. Qt가 정적으로 빌드될 때, target
가 Qml 라이브러리에 링크되면 이 명령은 타겟 최종화의 일부로 자동으로 호출됩니다. 기본적으로 이 최종화는 target
이 생성된 동일한 디렉토리 범위의 끝에서 발생합니다. target
대신 표준 CMake add_executable()
명령을 사용하여 만든 경우 프로젝트는 qt_import_qml_plugins()
자체를 호출해야 합니다.
Q_IMPORT_QML_PLUGIN 를참조하세요 .
© 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.