QT_HARMONYOS_USE_TARGET_BUILD_DIR

Enables the use of per-target HarmonyOS build directories.

This variable was introduced in Qt 6.12.1.

Note: This variable is in technology preview and may change in future releases.

Note: This variable is used only if targeting the HarmonyOS platform.

Qt generates the HAP project of an executable target in a directory next to the target. By default, this directory is called harmonyos-build-<target>, so that several executable targets in the same CMakeLists.txt do not overwrite each other's HAP project.

Set this variable to OFF to use a directory called harmonyos-build instead. Only one executable target per CMakeLists.txt is supported then.

The build directory is also written as harmonyos-build-directory into the target's deployment settings file, where tools like Qt Creator read it.

See also Qt for HarmonyOS and Setting CMake variables and properties.