diff --git a/src/corelib/doc/snippets/cmake-macros/examples.cmake b/src/corelib/doc/snippets/cmake-macros/examples.cmake index 31cf4811e0d..62d6324bc9b 100644 --- a/src/corelib/doc/snippets/cmake-macros/examples.cmake +++ b/src/corelib/doc/snippets/cmake-macros/examples.cmake @@ -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] diff --git a/src/corelib/doc/src/cmake/qt_add_big_resources.qdoc b/src/corelib/doc/src/cmake/qt_add_big_resources.qdoc index 07e75f6fc52..8cb78cf9c15 100644 --- a/src/corelib/doc/src/cmake/qt_add_big_resources.qdoc +++ b/src/corelib/doc/src/cmake/qt_add_big_resources.qdoc @@ -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.