From ccc5223d94b76bcd7c70b27797d4eff73430993a Mon Sep 17 00:00:00 2001 From: Leena Miettinen Date: Fri, 3 Dec 2021 11:42:13 +0100 Subject: [PATCH] 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 --- .../creator-only/creator-projects-creating.qdoc | 17 ++++++++++++++--- 1 file changed, 14 insertions(+), 3 deletions(-) diff --git a/doc/qtcreator/src/projects/creator-only/creator-projects-creating.qdoc b/doc/qtcreator/src/projects/creator-only/creator-projects-creating.qdoc index 76a67382562..43d5ab1c944 100644 --- a/doc/qtcreator/src/projects/creator-only/creator-projects-creating.qdoc +++ b/doc/qtcreator/src/projects/creator-only/creator-projects-creating.qdoc @@ -467,9 +467,20 @@ The procedure of adding a library to a project depends on the build system that you use. - When you create a new project, 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 template to build the project. + \section2 CMake Projects + + 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 > \uicontrol {New File or Project} > \uicontrol {Other Project} >