QT_TARGETS_FOLDER
Esta propiedad se introdujo en Qt 6.5.
Nombre de la CARPETA para los objetivos internos que añaden los comandos CMake de Qt.
Por defecto, esta propiedad no está definida.
Esta propiedad solo surte efecto si la propiedad USE_FOLDERS de CMake es ON.
Nota: La propiedad QT_TARGETS_FOLDER debe estar activada antes de llamar a qt_standard_project_setup().
Ejemplo
Habilitar la compatibilidad con carpetas con valores predeterminados
Al llamar a `qt_standard_project_setup()` sin ningún parámetro, se habilita la compatibilidad con carpetas de CMake. Los objetivos « AUTOGEN » de CMake y los objetivos internos de Qt se colocan en la carpeta ` 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)Establecer explícitamente los nombres de las carpetas
Este ejemplo muestra cómo establecer los nombres de las carpetas para los objetivos internos de Qt.
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)Si quieres que los objetivos « AUTOGEN » de CMake aparezcan en una carpeta independiente, configura también « AUTOGEN_TARGETS_FOLDER ».
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)Véase también 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.