summaryrefslogtreecommitdiffstats
path: root/generated/meson.build
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 /generated/meson.build
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 'generated/meson.build')
-rw-r--r--generated/meson.build27
1 files changed, 27 insertions, 0 deletions
diff --git a/generated/meson.build b/generated/meson.build
new file mode 100644
index 0000000000..ab09d1afa8
--- /dev/null
+++ b/generated/meson.build
@@ -0,0 +1,27 @@
+ebml_defs = custom_target('ebml_defs',
+ output: 'ebml_defs.inc',
+ command: [matroska, '--generate-definitions', '@OUTPUT@'],
+)
+
+ebml_types = custom_target('ebml_types',
+ output: 'ebml_types.h',
+ command: [matroska, '--generate-header', '@OUTPUT@'],
+)
+
+version_h = custom_target('version.h',
+ output: 'version.h',
+ command: [version_py, '@OUTPUT@'],
+ build_always_stale: true,
+)
+
+sources += [ebml_defs, ebml_types, version_h]
+
+# Meson doesn't allow having multiple build targets with the same name in the same file.
+# Just generate the com in here for windows builds.
+if win32 and get_option('cplayer')
+ features += 'win32-executable'
+ wrapper_flags = ['-municode', '-Wl,--subsystem,console']
+ wrapper_sources= '../osdep/win32-console-wrapper.c'
+ executable('mpv', wrapper_sources, c_args: wrapper_flags, link_args: wrapper_flags,
+ name_suffix: 'com', install: true)
+endif