QT_ANDROID_BUILD_DIR

ターゲットの Android ビルドディレクトリへの読み取り専用パス。

このプロパティは Qt 6.12 で導入されました。

注:この プロパティは、Androidプラットフォームを対象とする場合にのみ使用されます。

ターゲットをAndroid APKまたはAABとしてパッケージ化する際に使用されるandroid-build ディレクトリへのパスを指定します。正確なパスは、QT_USE_TARGET_ANDROID_BUILD_DIRが設定されているかどうかによって異なります。TRUE の場合、パスは<binary-dir>/android-build-<target> となります。それ以外の場合は、<binary-dir>/android-build となります。

このプロパティはqt_add_executable()の呼び出し時に設定され、ターゲットのファイナライズを待たずに即座に利用可能です。

このプロパティは、カスタムコマンド内でビルドディレクトリを参照する際に役立ちます:

qt_add_executable(MyApp main.cpp)

get_target_property(android_build_dir MyApp QT_ANDROID_BUILD_DIR)
add_custom_command(POST_BUILD TARGET MyApp
    WORKING_DIRECTORY "${android_build_dir}"
    COMMAND cmd /c "${android_build_dir}/postbuild.cmd"
)

プロジェクトでは、このプロパティを手動で設定すべきではありません。

QT_ANDROID_DEPLOYMENT_SETTINGS_FILEおよびQT_USE_TARGET_ANDROID_BUILD_DIRも参照してください 。

© 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.