aboutsummaryrefslogtreecommitdiff
path: root/docs/markdown/External-Project-module.md
diff options
context:
space:
mode:
authorJussi Pakkanen <jpakkane@gmail.com>2021-01-30 13:20:59 +0200
committerJussi Pakkanen <jpakkane@gmail.com>2021-01-30 16:19:59 +0000
commitf72ee8e742a171db74ed32b54b85953b8dfe1d77 (patch)
tree80e015f57b8bfc3c0a0fccb6b0d4ef4d602c0a0d /docs/markdown/External-Project-module.md
parent4f8cecca9733588b083dba8488143fa1ffb0e495 (diff)
downloadmeson-f72ee8e742a171db74ed32b54b85953b8dfe1d77.zip
meson-f72ee8e742a171db74ed32b54b85953b8dfe1d77.tar.gz
meson-f72ee8e742a171db74ed32b54b85953b8dfe1d77.tar.bz2
Rewrap long text lines in docs. [skip ci]
Diffstat (limited to 'docs/markdown/External-Project-module.md')
-rw-r--r--docs/markdown/External-Project-module.md52
1 files changed, 29 insertions, 23 deletions
diff --git a/docs/markdown/External-Project-module.md b/docs/markdown/External-Project-module.md
index e469024..c13f81b 100644
--- a/docs/markdown/External-Project-module.md
+++ b/docs/markdown/External-Project-module.md
@@ -5,21 +5,24 @@
*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
current workdir inside Meson's build directory and not subproject's top source
directory.
@@ -31,6 +34,7 @@ External build system requirements:
transparently.
Known limitations:
+
- Executables from external projects cannot be used uninstalled, because they
would need its libraries to be installed in the final location. This is why
there is no `find_program()` method.
@@ -49,17 +53,18 @@ 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`), that file must be in the current directory and
-executable. Note that if a bootstrap script is required (e.g. `autogen.sh` when
-building from git instead of tarball), it can be done using `run_command()`
-before calling `add_project()` method.
+Its first positional argument is the name of the configure script to
+be executed (e.g. `configure`), that file must be in the current
+directory and executable. Note that if a bootstrap script is required
+(e.g. `autogen.sh` when building from git instead of tarball), it can
+be done using `run_command()` before calling `add_project()` method.
Keyword arguments:
+
- `configure_options`: An array of strings to be passed as arguments to the
configure script. Some special tags will be replaced by Meson before passing
them to the configure script: `@PREFIX@`, `@LIBDIR@` and `@INCLUDEDIR@`.
@@ -115,8 +120,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`.