Debian Codegraph @

subprojects/meson-docs/docs/markdown/Mixing-build-systems.md

raw
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 project.
6 There are several projects that would like to mix build systems, that
7 is, build dependencies in the same build directory as the other build
8 system by having one build system call the other. The build
9 directories do not necessarily need to be inside each other, but that
10 is the common case.
11
12 This page lists the Meson project's stance on mixing build systems.
13 The tl/dr version is that while we do provide some functionality for
14 this use case, it only works for simple cases. Anything more complex
15 cannot be made reliable and trying to do that would burden Meson
16 developers with an effectively infinite maintenance burden. Thus these
17 use cases are not guaranteed to work, and even if a project using them
18 works today there are no guarantees that it will work in any future
19 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.