QT_ANDROID_ADD_APK_TARGET
안드로이드 디플로이큐트를 실행하여 APK를 생성하는 빌드 타겟을 정의합니다.
이 명령은 Qt6
패키지의 Core
컴포넌트에 정의되어 있으며, 다음과 같이 로드할 수 있습니다:
find_package(Qt6 REQUIRED COMPONENTS Core)
이 명령은 Qt 6.0에 도입되었습니다.
경고: 이 명령은 Qt 6.5부터 더 이상 사용되지 않습니다. 대신 qt_add_executable을 사용하십시오.
참고: 이 명령은 안드로이드 플랫폼을 대상으로 하는 경우에만 호출해야 합니다.
개요
qt_android_add_apk_target(target)
버전 없는 명령이 비활성화되어 있으면 qt6_android_add_apk_target()
을 대신 사용합니다. 이 명령과 동일한 인수 집합을 지원합니다.
설명
이 명령으로 생성된 <target>_make_apk
및 <target>_make_aab
사용자 지정 타겟은 Android 배포 설정 파일을 가져와 androiddeployqt
을 실행하여 각각 APK 및 AAB를 생성합니다. 설정 파일의 위치는 target
의 QT_ANDROID_DEPLOYMENT_SETTINGS_FILE
속성에서 가져옵니다. 이 파일은 일반적으로 qt_android_generate_deployment_settings()에 의해 생성됩니다. 각 안드로이드 패키지는 target
의 CMake 빌드 디렉터리 아래 android-build
하위 디렉터리에 생성됩니다.
<target>_make_apk
및 <target>_make_aab
타깃은 각각 자동으로 생성되는 apk
및 aab
빌드 타깃의 종속성으로 자동 추가됩니다. QT_NO_GLOBAL_APK_TARGET
및 QT_NO_GLOBAL_AAB_TARGET
변수를 TRUE
로 설정하여 apk
및 aab
타깃 생성을 비활성화할 수 있습니다.
예제
qt_android_generate_deployment_settings(myapp) qt_android_add_apk_target(myapp)
위의 명령은 각각 프로젝트의 myapp
패키지 또는 모든 APK 및 AAB를 생성하는 데 사용할 수 있는 myapp_make_apk
, myapp_make_aab
, apk
, aab
빌드 타겟을 정의합니다.
qt_android_generate_deployment_settings(), qt_finalize_target() 및 qt_finalize_project()도 참조하십시오 .
© 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.