Doc: Document how to treat qt_add_big_resources args as source files
The arguments to qt_add_big_resources are not known to CMake as source files. They need to be added explicitly to a CMake target in order for Qt Creator to treat them as source files and in the case of a qrc file to expand the contents in the project view. Fixes: QTBUG-104320 Change-Id: Iea755d998e8f9814a82983272731b0c654f80644 Reviewed-by: Jörg Bornemann <joerg.bornemann@qt.io> (cherry picked from commit 7037f4620fb59b669d32fbce0ef79aabe38a716a) Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
This commit is contained in:
parent
b8ed8789db
commit
393eb4fa97
@ -20,6 +20,11 @@ qt_add_resources(myapp "images"
|
||||
#! [qt_add_big_resources]
|
||||
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)
|
||||
|
||||
add_executable(myapp ${SOURCES})
|
||||
#! [qt_add_big_resources]
|
||||
|
||||
|
@ -34,6 +34,10 @@ generates object files (\c .o, \c .obj) files instead of C++ source code.
|
||||
This allows to embed bigger resources, where compiling to C++ sources and then
|
||||
to binaries would be too time consuming or memory intensive.
|
||||
|
||||
\note The \c{file1.qrc} will not be treated as a source file by Qt Creator. It
|
||||
needs to be added as a source file to a CMake target and have the property
|
||||
\c{SKIP_AUTORCC} set to \c{ON}.
|
||||
|
||||
\section1 Arguments
|
||||
|
||||
You can set additional \c{OPTIONS} that should be added to the \c{rcc} calls.
|
||||
|
Loading…
x
Reference in New Issue
Block a user