aboutsummaryrefslogtreecommitdiff
path: root/docs/markdown/External-Project-module.md
diff options
context:
space:
mode:
Diffstat (limited to 'docs/markdown/External-Project-module.md')
-rw-r--r--docs/markdown/External-Project-module.md49
1 files changed, 26 insertions, 23 deletions
diff --git a/docs/markdown/External-Project-module.md b/docs/markdown/External-Project-module.md
index 54b248f..65bd92d 100644
--- a/docs/markdown/External-Project-module.md
+++ b/docs/markdown/External-Project-module.md
@@ -5,19 +5,21 @@
*This is an experimental module, API could change.*
-This module allows building code that uses build systems other than Meson. This
-module is intended to be used to build Autotools subprojects as fallback if the
-dependency couldn't be found on the system (e.g. too old distro version).
-
-The project will be compiled out-of-tree inside Meson's build directory. The
-project will also be installed inside Meson's build directory using make's
+This module allows building code that uses build systems other than
+Meson. This module is intended to be used to build Autotools
+subprojects as fallback if the dependency couldn't be found on the
+system (e.g. too old distro version).
+
+The project will be compiled out-of-tree inside Meson's build
+directory. The project will also be installed inside Meson's build
+directory using make's
[`DESTDIR`](https://www.gnu.org/prep/standards/html_node/DESTDIR.html)
-feature. During project installation step, that DESTDIR will be copied verbatim
-into the desired location.
+feature. During project installation step, that DESTDIR will be copied
+verbatim into the desired location.
-External subprojects can use libraries built by Meson (main project, or other
-subprojects) using pkg-config, thanks to `*-uninstalled.pc` files generated by
-[`pkg.generate()`](Pkgconfig-module.md).
+External subprojects can use libraries built by Meson (main project,
+or other subprojects) using pkg-config, thanks to `*-uninstalled.pc`
+files generated by [`pkg.generate()`](Pkgconfig-module.md).
External build system requirements:
- Must support out-of-tree build. The configure script will be invoked with the
@@ -49,13 +51,13 @@ Known limitations:
### `add_project()`
-This function should be called at the root directory of a project using another
-build system. Usually in a `meson.build` file placed in the top directory of a
-subproject, but could be also in any subdir.
+This function should be called at the root directory of a project
+using another build system. Usually in a `meson.build` file placed in
+the top directory of a subproject, but could be also in any subdir.
-Its first positional argument is the name of the configure script to be
-executed (e.g. `configure` or `autogen.sh`), that file must be in the current
-directory and executable.
+Its first positional argument is the name of the configure script to
+be executed (e.g. `configure` or `autogen.sh`), that file must be in
+the current directory and executable.
Keyword arguments:
- `configure_options`: An array of strings to be passed as arguments to the
@@ -81,8 +83,8 @@ Returns an [`ExternalProject`](#ExternalProject_object) object
#### `dependency(libname)`
-Return a dependency object that can be used to build targets against a library
-from the external project.
+Return a dependency object that can be used to build targets against a
+library from the external project.
Keyword arguments:
- `subdir` path relative to `includedir` to be added to the header search path.
@@ -109,8 +111,9 @@ mylib_dep = p.dependency('mylib')
## Using wrap file
-Most of the time the project will be built as a subproject, and fetched using
-a `.wrap` file. In that case the simple `meson.build` file needed to build the
-subproject can be provided by adding `patch_directory=mysubproject` line
-in the wrap file, and place the build definition file at
+Most of the time the project will be built as a subproject, and
+fetched using a `.wrap` file. In that case the simple `meson.build`
+file needed to build the subproject can be provided by adding
+`patch_directory=mysubproject` line in the wrap file, and place the
+build definition file at
`subprojects/packagefiles/mysubproject/meson.build`.