이 페이지에서

QT_TARGETS_FOLDER

이 속성은 Qt 6.5에서 도입되었습니다.

Qt의 CMake 명령어로 추가되는 내부 타깃을 위한 폴더의 이름입니다.

기본적으로 이 속성은 설정되어 있지 않습니다.

이 속성은 CMake의 USE_FOLDERS 속성이 ` ON`인 경우에만 적용됩니다.

참고: qt_standard_project_setup()을 호출하기 전에 QT_TARGETS_FOLDER 속성을 설정해야 합니다.

예시

기본값을 사용하여 폴더 지원 활성화

매개변수 없이 qt_standard_project_setup()을 호출하면 CMake의 폴더 지원이 활성화됩니다. CMake의 AUTOGEN 타깃과 Qt의 내부 타깃은 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)

폴더 이름을 명시적으로 설정하기

이 예제는 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)

CMake의 ` AUTOGEN ` 타깃이 별도의 폴더에 표시되도록 하려면 ` 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)

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.