Doc - Using SUBDIRS variable

Task-number: QTCREATORBUG-2430

Reviewed-by: hjk

Reviewed-by: Jarek Kobus
This commit is contained in:
Leena Miettinen
2010-09-30 14:41:52 +02:00
parent 997e2e5348
commit beb4af4bce

View File

@@ -1927,6 +1927,35 @@
This also makes the files available in the \gui Locator.
\section1 Adding Subprojects to Projects
When you create a new project, you can add it to another project as a subproject
in the \gui{Project Management} dialog. However, you first have to edit the
.pro file of the parent project to specify that qmake uses the \c subdirs template
to build the project.
The \c subdirs template creates a Makefile for building subprojects. They can be
located either in subdirectories of the project directory or in any other directory.
The location of the targets is specified using the SUBDIRS variable. If the project file
has the same name as the directory, you can just specify the directory name. If the project
name and directory name are different, you must specify the project file name (.pro).
For more information on the SUBDIRS variable, see the
\l{http://doc.qt.nokia.com/4.7/qmake-variable-reference.html#subdirs}{qmake Variable Reference}.
For example, the following code specifies that plugin_coreplugin/plugin_coreplugin.pro
and mylogin.pro belong to the project:
\code
TEMPLATE = subdirs
SUBDIRS = plugin_coreplugin \
../another/plugin/myplugin.pro
\endcode
To specify dependencies, use the \gui{Add Library} wizard. For more information,
see \l{Adding Libraries to qmake Projects}.
*/