Doc: Add CMake section about how to include .qrc files in a project
The current docs only describes how to do this in qmake. Let's use a tab
and add a CMake section.
Fixes: QTBUG-120568
Pick-to: 6.6 6.5
Change-Id: I766e92818c3e20aad5498443aa107aa369089ad0
Reviewed-by: Mitch Curtis <mitch.curtis@qt.io>
Reviewed-by: Paul Wicking <paul.wicking@qt.io>
(cherry picked from commit 37c2d3cda3
)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
This commit is contained in:
parent
fa4d1b91dd
commit
16ebb44a5f
|
@ -152,12 +152,39 @@
|
|||
is possible to provide a different configuration file for different platforms and
|
||||
locales. See \l QFileSelector documentation for more details.
|
||||
|
||||
Finally, the \c .qrc file must be listed in the application's \c .pro file so that
|
||||
the build system knows about it. For example:
|
||||
Finally, the \c .qrc file must be listed in the application's build file.
|
||||
For example:
|
||||
|
||||
\code
|
||||
RESOURCES = application.qrc
|
||||
\if defined(onlinedocs)
|
||||
\tab {build-qt-app}{tab-cmake}{CMakeLists.txt (CMake)}{checked}
|
||||
\tab {build-qt-app}{tab-qmake}{.pro (qmake)}{}
|
||||
\tabcontent {tab-cmake}
|
||||
\else
|
||||
\section2 Using CMake
|
||||
\endif
|
||||
\badcode
|
||||
set(CMAKE_AUTORCC ON)
|
||||
qt_add_executable(my_app
|
||||
application.qrc
|
||||
main.cpp
|
||||
...
|
||||
)
|
||||
\endcode
|
||||
\if defined(onlinedocs)
|
||||
\endtabcontent
|
||||
\tabcontent {tab-qmake}
|
||||
\else
|
||||
\section2 Using qmake
|
||||
\endif
|
||||
\badcode
|
||||
RESOURCES = application.qrc
|
||||
...
|
||||
\endcode
|
||||
\if defined(onlinedocs)
|
||||
\endtabcontent
|
||||
\endif
|
||||
|
||||
See also: \l {Build System Integration}
|
||||
|
||||
\section1 Related Information
|
||||
|
||||
|
|
Loading…
Reference in New Issue