forked from qt-creator/qt-creator
Doc: Describe how to declare files in projects
Including using OTHER_FILES for qmake projects. Fixes: QTCREATORBUG-27157 Change-Id: I802000c90472464430d1335b9e962c6691cc567a Reviewed-by: Eike Ziller <eike.ziller@qt.io>
This commit is contained in:
@@ -230,9 +230,10 @@
|
|||||||
|
|
||||||
\endlist
|
\endlist
|
||||||
|
|
||||||
If locator does not find some files, you can add them to the \c DISTFILES
|
\if defined(qtcreator)
|
||||||
variable in the \c .pro file to include them into the distribution tarball
|
If locator does not find some files, see \l{Specifying Project Contents}
|
||||||
of your project and thus make them known to \QC as well.
|
for how to make them known to the locator.
|
||||||
|
\endif
|
||||||
|
|
||||||
\section1 Configuring Locator Filters
|
\section1 Configuring Locator Filters
|
||||||
|
|
||||||
|
@@ -121,8 +121,7 @@
|
|||||||
|
|
||||||
\li Select \uicontrol {Use file *.astylerc defined in project files}
|
\li Select \uicontrol {Use file *.astylerc defined in project files}
|
||||||
or \uicontrol {Use file uncrustify.cfg defined in project files},
|
or \uicontrol {Use file uncrustify.cfg defined in project files},
|
||||||
to use the configuration file
|
to use the configuration file \l{Specifying Project Contents}
|
||||||
\l{Displaying Additional File Types in Projects View}
|
|
||||||
{defined in the project file} as the configuration file
|
{defined in the project file} as the configuration file
|
||||||
for the selected tool.
|
for the selected tool.
|
||||||
|
|
||||||
|
@@ -142,6 +142,12 @@
|
|||||||
|
|
||||||
\image qtcreator-search-allprojects.png
|
\image qtcreator-search-allprojects.png
|
||||||
|
|
||||||
|
\if defined(qtcreator)
|
||||||
|
If you cannot find some files, see
|
||||||
|
\l{Specifying Project Contents} for how
|
||||||
|
to declare them as a part of the project.
|
||||||
|
\endif
|
||||||
|
|
||||||
\li \uicontrol {Current Project} searches from the project you
|
\li \uicontrol {Current Project} searches from the project you
|
||||||
are currently editing.
|
are currently editing.
|
||||||
|
|
||||||
|
@@ -56,6 +56,7 @@
|
|||||||
\section1 Adding Missing Files
|
\section1 Adding Missing Files
|
||||||
|
|
||||||
The process to add files to deploy depends on the build system you use.
|
The process to add files to deploy depends on the build system you use.
|
||||||
|
For more information, see \l{Specifying Project Contents}.
|
||||||
|
|
||||||
\section2 CMake Builds
|
\section2 CMake Builds
|
||||||
|
|
||||||
|
@@ -239,21 +239,33 @@
|
|||||||
|
|
||||||
\include creator-python-project.qdocinc python project wizards
|
\include creator-python-project.qdocinc python project wizards
|
||||||
|
|
||||||
\section1 Displaying Additional File Types in Projects View
|
\section1 Specifying Project Contents
|
||||||
|
|
||||||
|
A project can contain files that should be:
|
||||||
|
|
||||||
|
\list
|
||||||
|
\li Compiled or otherwise handled by the build
|
||||||
|
\li Installed
|
||||||
|
\li Not installed, but included in a source package created with
|
||||||
|
\c {make dist}
|
||||||
|
\li Not installed, nor be part of a source package, but still be known
|
||||||
|
to \QC
|
||||||
|
\endlist
|
||||||
|
|
||||||
\QC displays all files that are declared to be part of the project by the
|
\QC displays all files that are declared to be part of the project by the
|
||||||
project files in the \l Projects view. The files are sorted into categories
|
project files in the \l Projects view. The files are sorted into categories
|
||||||
by file type (.cpp, .h, .qrc, and so on). To display additional files, edit
|
by file type (.cpp, .h, .qrc, and so on). To display additional files, edit
|
||||||
the project file.
|
the project file. Alternatively, you can see all the files in a project
|
||||||
|
directory in the \l {File System} view.
|
||||||
|
|
||||||
Alternatively, you can see all the files in a project in the
|
Declaring files as a part of the project also makes them visible to the
|
||||||
\l {File System} view.
|
\l{Searching with the Locator}{locator} and \l{Advanced Search}
|
||||||
|
{project-wide search}.
|
||||||
|
|
||||||
\section2 CMake Projects
|
\section2 CMake Projects
|
||||||
|
|
||||||
When using CMake, you can specify additional files to display in the
|
When using CMake, you can specify additional files for a project by either
|
||||||
\uicontrol Projects view by either adding them as sources or installing
|
adding them as sources or installing them.
|
||||||
them.
|
|
||||||
|
|
||||||
In the CMakeLists.txt file, define the files as values of the
|
In the CMakeLists.txt file, define the files as values of the
|
||||||
\l{CMake: target_sources command}{target_sources} command using
|
\l{CMake: target_sources command}{target_sources} command using
|
||||||
@@ -273,11 +285,17 @@
|
|||||||
|
|
||||||
\section2 qmake Projects
|
\section2 qmake Projects
|
||||||
|
|
||||||
When using qmake, add filenames as values of the \c {DISTFILES} variable
|
Use the following variables in the .pro file:
|
||||||
in the .pro file. You can also use wildcards.
|
|
||||||
|
|
||||||
For example, the following value specifies that text files are part of the
|
\list
|
||||||
project:
|
\li \c SOURCES and \c HEADERS for files to compile
|
||||||
|
\li \c INSTALLS for files to install
|
||||||
|
\li \c DISTFILES for files to include in a source package
|
||||||
|
\li \c OTHER_FILES for files to manage with \QC without
|
||||||
|
installing them or including them in source packages
|
||||||
|
\endlist
|
||||||
|
|
||||||
|
For example, the following value includes text files in the source package:
|
||||||
|
|
||||||
\badcode
|
\badcode
|
||||||
|
|
||||||
|
@@ -155,6 +155,9 @@
|
|||||||
allows to specify exactly where a new file should be placed in the build
|
allows to specify exactly where a new file should be placed in the build
|
||||||
system.
|
system.
|
||||||
|
|
||||||
|
If you cannot see some files, they might not be declared as part of the
|
||||||
|
project. For more information, see \l{Specifying Project Contents}.
|
||||||
|
|
||||||
If the project is under version control, information from the version
|
If the project is under version control, information from the version
|
||||||
control system might be displayed in brackets after the project name.
|
control system might be displayed in brackets after the project name.
|
||||||
This is currently implemented for Git (the branch name or a tag is
|
This is currently implemented for Git (the branch name or a tag is
|
||||||
|
Reference in New Issue
Block a user