QT_ADD_BIG_자원
큰 바이너리 리소스를 객체 코드로 컴파일합니다.
이 명령은 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})
© 2025 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.