On this page

QT_TARGETS_FOLDER

This property was introduced in Qt 6.5.

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

Name of the FOLDER for internal targets that are added by Qt's CMake commands.

By default, this property is not set.

This property only has an effect if CMake's USE_FOLDERS property is ON.

Note: The property QT_TARGETS_FOLDER must be set before calling qt_standard_project_setup.

Example

Enable folder support with default values

Calling qt_standard_project_setup without any parameters enables CMake's folder support. CMake's AUTOGEN targets and Qt's internal targets are placed into the folder QtInternalTargets.

cmake_minimum_required(VERSION 3.16...3.22)
project(MyProject)

find_package(Qt6 REQUIRED COMPONENTS Core)
qt_standard_project_setup()

qt_add_executable(MyApp main.cpp)

Explicitly set folder names

This example shows how to set the folder names for internal Qt targets.

cmake_minimum_required(VERSION 3.16...3.22)
project(MyProject)

find_package(Qt6 REQUIRED COMPONENTS Core)

set_property(GLOBAL PROPERTY QT_TARGETS_FOLDER "MyQtTargets")
qt_standard_project_setup()

qt_add_executable(MyApp main.cpp)

If you want CMake's AUTOGEN targets to appear in a separate folder, set AUTOGEN_TARGETS_FOLDER too.

cmake_minimum_required(VERSION 3.16...3.22)
project(MyProject)

find_package(Qt6 REQUIRED COMPONENTS Core)

set_property(GLOBAL PROPERTY QT_TARGETS_FOLDER "MyQtTargets")
set_property(GLOBAL PROPERTY AUTOGEN_TARGETS_FOLDER "MyAutogenTargets")
qt_standard_project_setup()

qt_add_executable(MyApp main.cpp)

See also qt_standard_project_setup.

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