이 페이지에서

qt_add_binary_resources

Qt 리소스 파일 목록을 기반으로 RCC 파일을 생성합니다.

이 명령어는 Qt6 패키지의 Core 구성 요소에 정의되어 있으며, 다음과 같이 불러올 수 있습니다:

find_package(Qt6 REQUIRED COMPONENTS Core)

이 명령어는 Qt 5.10에서 도입되었습니다.

개요

qt_add_binary_resources(target file1.qrc [file2.qrc ...]
                        [DESTINATION ...]
                        [OPTIONS ...])

버전 정보가 없는 명령어가 비활성화된 경우, 대신 ` qt6_add_binary_resources() `을 사용하십시오. 이 명령어는 본 명령어와 동일한 인자 세트를 지원합니다.

설명

Qt 리소스 파일을 바이너리 .rcc 파일로 컴파일하는 사용자 정의 ` target `를 추가합니다.

인수

DESTINATION 생성된 .rcc 파일의 경로를 설정합니다. 기본값은 ${CMAKE_CURRENT_BINARY_DIR}/${target}.rcc 입니다.

rcc 호출에 추가되어야 할 추가 OPTIONS 을 설정할 수 있습니다. 사용 가능한 옵션은 rcc 문서에서 확인할 수 있습니다.

예시

qt_add_binary_resources(resources project.qrc OPTIONS -no-compress)
add_dependencies(myapp resources)

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