qt5_add_resources

概要

qt5_add_resources(<VAR> file1.qrc [file2.qrc ...]
                  [OPTIONS ...])
					
					

描述

Creates source code from Qt resource files using the RCC (资源编译器) 。将生成源文件的路径添加到 <VAR> .

注意: This is a low-level macro. See the CMake AUTORCC Documentation for a more convenient way to let Qt resource files be processed with rcc . For embedding bigger resources, see qt5_add_big_resources .

自变量

可以设置额外 选项 应该被添加到 rcc 调用。可以查找可能的选项在 RCC (资源编译器) 文档编制 .

范例

set(SOURCES main.cpp)
qt5_add_resources(SOURCES example.qrc)
add_executable(myapp ${SOURCES})