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