Doc: Describe adding other projects to CMake projects

Mostly, this is explained in CMake documentation. There is
currently no special support for this in Qt Creator.

Task-number: QTCREATORBUG-26616
Change-Id: I7981324e04be6fc716256754db9f2089eaffee73
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
This commit is contained in:
Leena Miettinen
2021-12-03 11:42:13 +01:00
parent 0a8ab22f41
commit ccc5223d94

View File

@@ -467,9 +467,20 @@
The procedure of adding a library to a project depends on the build The procedure of adding a library to a project depends on the build
system that you use. system that you use.
When you create a new project, you can add it to another project as a \section2 CMake Projects
subproject in the \uicontrol{Project Management} dialog. However, the root project
must specify that qmake uses the \c subdirs template to build the project. You can add CMakeLists.txt files to any project by using the
\l{https://cmake.org/cmake/help/latest/command/add_subdirectory.html}
{add_subdirectory} command. The files can define complete projects that
are included into the top-level project or any other CMake commands.
\section2 qmake Projects
When you create a new project and select qmake as the build system,
you can add it to another project as a subproject in the
\uicontrol{Project Management} dialog. However, the root project
must specify that qmake uses the \c subdirs \l{TEMPLATE}{template} to
build the project.
To create a root project, select \uicontrol File > To create a root project, select \uicontrol File >
\uicontrol {New File or Project} > \uicontrol {Other Project} > \uicontrol {New File or Project} > \uicontrol {Other Project} >