Improve build system doc

fix/windows/stop_console
Martchus 6 years ago
parent 52a76a7bd2
commit d5d8b308e9
  1. 33
      doc/buildvariables.md

@ -1,6 +1,7 @@
# Build system
\brief Variables to control the build system and provided CMake modules
\brief Documents variables to control the build system and provided CMake
modules
## Variables passable as CMake arguments
@ -90,19 +91,24 @@ and qtutilities.
* `META_CXX_STANDARD=11/14/..`: specifies the C++ version, default is 14
### Files
* `HEADER_FILES/SRC_FILES`: specifies C++ header/source files
* `HEADER_FILES`/`SRC_FILES`: specifies C++ header/source files
* `TEST_HEADER_FILES`/`TEST_SRC_FILES`: specifies C++ header/source files of the
tests
* `TS_FILES`: specifies Qt translations
* `RES_FILES`: specifies Qt resource files
* `DBUS_FILES`: specifies files for Qt DBus
* `WIDGETS_HEADER_FILES/WIDGETS_SRC_FILES`: specifies C++ header/source files
* `WIDGETS_HEADER_FILES`/`WIDGETS_SRC_FILES`: specifies C++ header/source files
only required for Qt Widgets GUI
* `QML_HEADER_FILES/QML_SRC_FILES/QML_RES_FILES`: specifies C++ header/source
files and Qt resouce files only required for Qt Quick GUI
* `QML_HEADER_FILES`/`QML_SRC_FILES`/`QML_RES_FILES`: specifies C++
header/source files and Qt resouce files only required for Qt Quick GUI
* `DOC_FILES`: additional markdown files to be inlcuded in the documentation
created via Doxygen; the first file is used as the main page
* `DOC_ONLY_FILES`: specifies documentation-only files
* `REQUIRED_ICONS`: names of the icons required by the application and the
used libraries (can be generated with `qtutilities/scripts/required_icons.sh`)
* `CMAKE_MODULE_FILES`/`CMAKE_TEMPLATE_FILES`: specifies CMake modules/templates
provides by the project; those files are installed so they can be used by
other projects
### Additional build variables
* `META_PRIVATE/PUBLIC_COMPILE_DEFINITIONS`: specifies private/public compile
@ -111,16 +117,18 @@ and qtutilities.
* `META_PUBLIC_QT_MODULES`: specifies Qt modules used in the public library
interface
## Use of the provided modules
## Provided modules
Most important modules:
* `BaseConfig`: does basic configuration, reads most of the `META`-variables
* `LibraryTarget`: does further configuration for building dynamic and static
libraries and plugins, `META_PROJECT_TYPE` must be set accordingly
* `AppTarget`: does further configuration for building an application,
libraries and plugins; `META_PROJECT_TYPE` must be set accordingly
* `AppTarget`: does further configuration for building an application;
`META_PROJECT_TYPE` must be set accordingly
* `ShellCompletion`: enables shell completion (only works when using the
argument parser provided by the library of course)
* `TestTarget`: adds a test target
* `ShellCompletion`: enables shell completion; only works when using the
argument parser provided by the ApplicationUtilities::ArgumentParser class
of course
* `TestTarget`: adds the test target `check` which is *not* required by target
`all`; uses files specified in `TEST_HEADER_FILES`/`TEST_SRC_FILES` variables
* `Doxygen`: adds a target to generate documentation using Doxygen
* `WindowsResources`: handles creation of windows resources to set application
meta data and icon
@ -130,4 +138,5 @@ Most important modules:
The inclusion order of the modules matters.
For an example, checkout the project file of c++utilities itself. The project
files of [Syncthing Tray](https://github.com/Martchus/syncthingtray) should
cover everything.
cover everything (library, plugin, application, tests, desktop file, Qt
resources and translations, ...).

Loading…
Cancel
Save