summaryrefslogtreecommitdiffstats
path: root/DOCS
diff options
context:
space:
mode:
authorDudemanguy <random342@airmail.cc>2021-11-07 13:28:16 -0600
committerDudemanguy <random342@airmail.cc>2021-11-14 19:13:10 +0000
commitff322864f2878a35b277111e509da03fe6f888bd (patch)
tree44a99850fb0adffdd51cb0406ca24ecd5c917b2d /DOCS
parentf610fe16c0b1cb74d73d02dc55792d4ddc262ad2 (diff)
downloadmpv-ff322864f2878a35b277111e509da03fe6f888bd.tar.bz2
mpv-ff322864f2878a35b277111e509da03fe6f888bd.tar.xz
build: add meson build support
Adds support for the meson build system as well as a bit of documentation. Compatibility with the existing waf build is maintained.
Diffstat (limited to 'DOCS')
-rw-r--r--DOCS/build-system-differences.md70
1 files changed, 70 insertions, 0 deletions
diff --git a/DOCS/build-system-differences.md b/DOCS/build-system-differences.md
new file mode 100644
index 0000000000..7b1a5e5bfd
--- /dev/null
+++ b/DOCS/build-system-differences.md
@@ -0,0 +1,70 @@
+# Differences Between Meson and Waf
+
+mpv currently supports two different build systems: waf and meson. In general,
+option names between both build systems are mostly the same. In most cases,
+``--enable-foo`` in waf becomes ``-Dfoo=enabled`` in meson. Likewise,
+``--disable-foo`` becomes ``-Dfoo=disabled``. For the rest of this document,
+Waf options will be noted as ``--foo`` while meson options are noted as
+``foo``.
+
+## Universal Options
+
+Meson has several [universal options](https://mesonbuild.com/Builtin-options.html#universal-options)
+that you get for free. In some cases, these overlapped with custom waf options.
+
+* ``--libmpv-static`` and ``--libmpv-shared`` were combined into one option:
+ ``libmpv``. Use ``default_library`` to control if you want to build static or
+ shared libraries.
+* Waf had a boolean ``--optimize`` option. In meson, this is a universal option,
+ ``optimization``, which can take several different values. In mpv's meson
+ build, the default is ``2``.
+* Instead of ``--debug-build``, meson simply calls it ``debug``. It is enabled
+ by default.
+
+## Changed Options
+
+* The legacy lua names (``52``, ``52deb``, etc.) for ``--lua`` are not
+ supported in the meson build. Instead, pass the generic pkg-config values
+ such as ``lua52``, ``lua5.2``, etc.
+* ``--lgpl`` was changed to ``gpl``. If ``gpl`` is false, the build is LGPL2.1+.
+
+### Boolean Options
+
+The following options are all booleans that accept ``true`` or ``false``
+instead of ``enabled`` or ``disabled``.
+
+* ``build-date``
+* ``cplayer``
+* ``gpl``
+* ``libmpv``
+* ``ta-leak-report``
+* ``tests``
+
+## Removed Options
+
+There are options removed with no equivalent in the meson build.
+
+* ``--asm`` was removed since it doesn't do anything.
+* ``--android`` was removed since meson knows if the machine is android.
+* ``--clang-compilation-database`` was removed. Meson can do this on its own
+ by invoking ninja (``ninja -t compdb``).
+* ``--tvos`` was removed since it doesn't do anything.
+* ``--static-build`` was removed. Use ``default_library``.
+* ``--swift-static`` was removed. The swift library always dynamically links.
+
+## Renamed Options
+
+These are some other options that were renamed.
+
+* ``--gl-wayland`` was renamed to ``egl-wayland``.
+* ``--swift`` was renamed to ``swift-build``.
+
+## Other
+
+* The meson build supports passing the ``SOURCE_DATE_EPOCH`` environment variable
+during the compilation step for those who want reproducibility without having to
+disable the build date.
+* The ``Configuration`` line shown by ``mpv -v`` does not show everything passed on
+cli since meson does not have any easy way to access a user's argv. Instead, it
+simply shows whatever the value of ``prefix`` is regardless if it was specified
+or not.