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})