qt_add_big_resources
대용량 바이너리 리소스를 객체 코드로 컴파일합니다.
이 명령어는 Qt6 패키지의 Core 구성 요소에 정의되어 있으며, 다음과 같이 로드할 수 있습니다:
find_package(Qt6 REQUIRED COMPONENTS Core)이 명령어는 Qt 5.12에서 도입되었습니다.
개요
qt_add_big_resources(<VAR> file1.qrc [file2.qrc ...]
[OPTIONS ...])버전 정보가 없는 명령어가 비활성화된 경우, 대신 qt6_add_big_resources() 를 사용하십시오. 이 명령어는 본 명령어와 동일한 인수를 지원합니다.
설명
Resource Compiler (rcc)를 사용하여 Qt 리소스 파일로부터 컴파일된 객체 파일을 생성합니다. 생성된 파일의 경로는 <VAR> 에 추가됩니다.
이는 qt_add_resources()와 유사하지만, C++ 소스 코드 대신 오브젝트 파일(.o, .obj)을 직접 생성합니다. 이를 통해 C++ 소스로 컴파일한 후 바이너리로 변환하는 과정이 너무 많은 시간이나 메모리를 소모하는 경우, 더 큰 리소스를 임베드할 수 있습니다.
참고: file1.qrc 파일은 Qt Creator 에 의해 소스 파일로 처리되지 않습니다. 이 파일을 CMake 타깃에 소스 파일로 추가하고, SKIP_AUTORCC 속성을 ON 로 설정해야 합니다.
경고: 이 명령은 iOS용 빌드 시 지원되지 않으므로, 대신 qt_add_resources()를 사용하십시오. 자세한 내용은 QTBUG-103497을 참조하십시오.
인수
rcc 호출에 추가되어야 할 추가 OPTIONS 를 설정할 수 있습니다. 사용 가능한 옵션은 rcc 문서에서 확인할 수 있습니다.
예시
set(SOURCES main.cpp)
qt_add_big_resources(SOURCES big_resource.qrc)
# Have big_resource.qrc treated as a source file by Qt Creator
list(APPEND SOURCES big_resource.qrc)
set_property(SOURCE big_resource.qrc PROPERTY SKIP_AUTORCC ON)
qt_add_executable(myapp ${SOURCES})© 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.