diff options
author | Dudemanguy <random342@airmail.cc> | 2023-07-23 17:54:35 -0500 |
---|---|---|
committer | Dudemanguy <random342@airmail.cc> | 2023-07-31 19:00:06 +0000 |
commit | 0bed2a226301bc7392f37e5d14e8f67c7037f0eb (patch) | |
tree | 96a6f2897d4ef505c26fb76cc8920b8d39279ea0 /meson.build | |
parent | b3b7ee8f4c07f1174140e7612e25dca9a23e6cbb (diff) | |
download | mpv-0bed2a226301bc7392f37e5d14e8f67c7037f0eb.tar.bz2 mpv-0bed2a226301bc7392f37e5d14e8f67c7037f0eb.tar.xz |
build: remove outdated generated directory
This only existed as essentially a workaround for meson's behavior and
to maintain compatibility with the waf build. Since waf put everything
in a generated subdirectory, we had to put make a subdirectory called
"generated" in the source for meson so stuff could go to the right
place. Well now we don't need to do that anymore. Move the meson.build
files around so they go in the appropriate place in the subdirectory of
the source tree and change the paths of the headers accordingly. A
couple of important things to note.
1. mpv.com now gets made in build/player/mpv.com (necessary because of
a meson limitation)
2. The macos icon generation path is shortened to
TOOLS/osxbundle/icon.icns.inc.
Diffstat (limited to 'meson.build')
-rw-r--r-- | meson.build | 31 |
1 files changed, 23 insertions, 8 deletions
diff --git a/meson.build b/meson.build index 62b98b60a5..56d8888fc9 100644 --- a/meson.build +++ b/meson.build @@ -558,12 +558,29 @@ file2string = find_program(join_paths(tools_directory, 'file2string.py')) matroska = find_program(join_paths(tools_directory, 'matroska.py')) version_py = find_program(join_paths(source_root, 'version.py')) -subdir('generated') -subdir(join_paths('generated', 'etc')) -subdir(join_paths('generated', 'sub')) +ebml_defs = custom_target('ebml_defs.inc', + output: 'ebml_defs.inc', + command: [matroska, '--generate-definitions', '@OUTPUT@'], +) + +ebml_types = custom_target('ebml_types.h', + 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] + +subdir('etc') +subdir('player') +subdir('sub') if darwin - subdir(join_paths('generated', 'TOOLS', 'osxbundle', 'mpv.app', 'Contents', 'Resources')) + subdir(join_paths('TOOLS', 'osxbundle')) endif @@ -618,7 +635,6 @@ if features['javascript'] dependencies += javascript sources += files('player/javascript.c', 'sub/filter_jsre.c') - subdir(join_paths('generated', 'player', 'javascript')) endif lcms2 = dependency('lcms2', version: '>= 2.6', required: get_option('lcms2')) @@ -691,7 +707,6 @@ lua_version = lua.name() if features['lua'] dependencies += lua sources += files('player/lua.c') - subdir(join_paths('generated', 'player', 'lua')) endif if not features['lua'] and lua_opt == 'enabled' error('lua enabled but no suitable lua version could be found!') @@ -1004,7 +1019,7 @@ endforeach features += {'wayland': wayland_deps and wayland['header'] and wayland['scanner'].found()} if features['wayland'] - subdir(join_paths('generated', 'wayland')) + subdir(join_paths('video', 'out')) endif features += {'memfd_create': false} @@ -1571,7 +1586,7 @@ if features['macos-media-player'] endif if swift.allowed() - subdir(join_paths('generated', 'osdep')) + subdir('osdep') endif macos_touchbar = get_option('macos-touchbar').require( |