Skip to content

Commit 999376a

Browse files
committed
Document the project policy on mixing build systems. [skip ci]
1 parent a94d707 commit 999376a

File tree

4 files changed

+62
-0
lines changed

4 files changed

+62
-0
lines changed

docs/markdown/CMake-module.md

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,8 @@
11
# CMake module
22

3+
**Note**: the functionality of this module is governed by [Meson's
4+
rules on mixing build systems](Mixing-build-systems.md].
5+
36
This module provides helper tools for generating cmake package files.
47
It also supports the usage of CMake based subprojects, similar to
58
the normal [meson subprojects](Subprojects.md).

docs/markdown/Mixing-build-systems.md

Lines changed: 55 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,55 @@
1+
# Meson's policy on mixing multiple build systems in one build directory
2+
3+
Meson has been designed with the principle that all dependencies are
4+
either provided by "the platform" via a mechanism such as Pkg-Config
5+
or that they are built as Meson subprojects under the main
6+
project. There are several projects that would like to mix build
7+
systems, that is, build dependencies in the same build directory as
8+
the other build system by having one build system call the other. The
9+
build directories do not necessarily need to be inside each other, but
10+
that is the common case.
11+
12+
This page lists the Meson project's stance on mixing build
13+
systems. The tl/dr version is that while we do provide some
14+
functionality for this use case, it only works for simple
15+
cases. Anything more complex can not be made reliable and trying to do
16+
that would burden Meson developers with an effectively infinite
17+
maintenance burden. Thus these use cases are not guaranteed to work,
18+
and even if a project using them works today there are no guarantees
19+
that it will work in any future version.
20+
21+
## The definition of "build system mixing"
22+
23+
For the purposes of this page, mixing build systems means any and all
24+
mechanisms where one build system uses build artifacts from a
25+
different build system's build directory in any way.
26+
27+
Note that this definition does not specify what the dependencies are
28+
and how they are built, only how they are consumed. For example
29+
suppose you have a standalone dependency library that builds with
30+
build system X. In this case having Meson call the build system to
31+
build the dependency at build time would be interpreted as mixing
32+
build systems. On the other hand a "Flatpak-like" approach of building
33+
and installing the library with an external mechanism and consuming it
34+
via a standard build-system agnostic method such as Pkg-Config would
35+
not be considered build system mixing. Use of uninstalled-pkgconfig
36+
files is considered mixing, though.
37+
38+
## What does this mean for support and compatibility?
39+
40+
The Meson project will not take on any maintenance burden to ensure
41+
anything other than the simple builds setups as discussed above will
42+
work. Nor will we make changes to support these use cases that would
43+
worsen the user experience of users of plain Meson. This includes, but
44+
is not limited to, the following:
45+
46+
- Any changes in other build systems that cause mixed project breakage
47+
will not be considered a bug in Meson.
48+
49+
- Breakages in mixed build projects will not be considered regressions
50+
and such problems will never be considered release blockers,
51+
regardless of what the underlying issue is.
52+
53+
- Any use case that would require major changes in Meson to work
54+
around missing or broken functionality in the other build system is
55+
not supported. These issues must be fixed upstream.

docs/markdown/snippets/uninstalled-pkgconfig.md

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,8 @@
11
## Uninstalled pkg-config files
22

3+
**Note**: the functionality of this module is governed by [Meson's
4+
rules on mixing build systems](Mixing-build-systems.md].
5+
36
The `pkgconfig` module now generates uninstalled pc files as well. For any generated
47
`foo.pc` file, an extra `foo-uninstalled.pc` file is placed into
58
`<builddir>/meson-uninstalled`. They can be used to build applications against

docs/sitemap.txt

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -105,6 +105,7 @@ index.md
105105
Design-rationale.md
106106
IndepthTutorial.md
107107
In-the-press.md
108+
Mixing-build-systems.md
108109
Pkg-config-files.md
109110
Playground.md
110111
Porting-from-autotools.md

0 commit comments

Comments
 (0)