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 /video | |
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 'video')
-rw-r--r-- | video/out/cocoa_common.m | 2 | ||||
-rw-r--r-- | video/out/meson.build | 51 | ||||
-rw-r--r-- | video/out/vo_dmabuf_wayland.c | 6 | ||||
-rw-r--r-- | video/out/wayland_common.c | 20 | ||||
-rw-r--r-- | video/out/x11_common.c | 8 |
5 files changed, 69 insertions, 18 deletions
diff --git a/video/out/cocoa_common.m b/video/out/cocoa_common.m index 222dde4520..5d5a423fe3 100644 --- a/video/out/cocoa_common.m +++ b/video/out/cocoa_common.m @@ -161,7 +161,7 @@ static void disable_power_management(struct vo_cocoa_state *s) } static const char macosx_icon[] = -#include "generated/TOOLS/osxbundle/mpv.app/Contents/Resources/icon.icns.inc" +#include "TOOLS/osxbundle/icon.icns.inc" ; static void set_application_icon(NSApplication *app) diff --git a/video/out/meson.build b/video/out/meson.build new file mode 100644 index 0000000000..a254e508bb --- /dev/null +++ b/video/out/meson.build @@ -0,0 +1,51 @@ +wl_protocol_dir = wayland['deps'][2].get_variable(pkgconfig: 'pkgdatadir', internal: 'pkgdatadir') +protocols = [[wl_protocol_dir, 'stable/presentation-time/presentation-time.xml'], + [wl_protocol_dir, 'stable/viewporter/viewporter.xml'], + [wl_protocol_dir, 'stable/xdg-shell/xdg-shell.xml'], + [wl_protocol_dir, 'unstable/idle-inhibit/idle-inhibit-unstable-v1.xml'], + [wl_protocol_dir, 'unstable/linux-dmabuf/linux-dmabuf-unstable-v1.xml'], + [wl_protocol_dir, 'unstable/xdg-decoration/xdg-decoration-unstable-v1.xml']] +wl_protocols_source = [] +wl_protocols_headers = [] + +features += {'wayland_protocols_1_27': wayland['deps'][2].version().version_compare('>=1.27')} +if features['wayland_protocols_1_27'] + protocols += [[wl_protocol_dir, 'staging/content-type/content-type-v1.xml'], + [wl_protocol_dir, 'staging/single-pixel-buffer/single-pixel-buffer-v1.xml']] +endif + +features += {'wayland_protocols_1_31': wayland['deps'][2].version().version_compare('>=1.31')} +if features['wayland_protocols_1_31'] + protocols += [[wl_protocol_dir, 'staging/fractional-scale/fractional-scale-v1.xml']] +endif + +features += {'wayland_protocols_1_32': wayland['deps'][2].version().version_compare('>=1.32')} +if features['wayland_protocols_1_32'] + protocols += [[wl_protocol_dir, 'staging/cursor-shape/cursor-shape-v1.xml'], + [wl_protocol_dir, 'unstable/tablet/tablet-unstable-v2.xml']] # required by cursor-shape +endif + +foreach p: protocols + xml = join_paths(p) + wl_protocols_source += custom_target(xml.underscorify() + '_c', + input: xml, + output: '@BASENAME@.c', + command: [wayland['scanner'], 'private-code', '@INPUT@', '@OUTPUT@'], + ) + wl_protocols_headers += custom_target(xml.underscorify() + '_h', + input: xml, + output: '@BASENAME@.h', + command: [wayland['scanner'], 'client-header', '@INPUT@', '@OUTPUT@'], + ) +endforeach + +lib_client_protocols = static_library('protocols', + wl_protocols_source + wl_protocols_headers, + dependencies: wayland['deps'][0]) + +client_protocols = declare_dependency(link_with: lib_client_protocols, + sources: wl_protocols_headers) + +dependencies += [client_protocols, wayland['deps']] + +sources += files('wayland_common.c') diff --git a/video/out/vo_dmabuf_wayland.c b/video/out/vo_dmabuf_wayland.c index ef1f767c1b..43c94882f2 100644 --- a/video/out/vo_dmabuf_wayland.c +++ b/video/out/vo_dmabuf_wayland.c @@ -41,11 +41,11 @@ #endif // Generated from wayland-protocols -#include "generated/wayland/linux-dmabuf-unstable-v1.h" -#include "generated/wayland/viewporter.h" +#include "linux-dmabuf-unstable-v1.h" +#include "viewporter.h" #if HAVE_WAYLAND_PROTOCOLS_1_27 -#include "generated/wayland/single-pixel-buffer-v1.h" +#include "single-pixel-buffer-v1.h" #endif // We need at least enough buffers to avoid a diff --git a/video/out/wayland_common.c b/video/out/wayland_common.c index 2e6722c8c2..49412ee46c 100644 --- a/video/out/wayland_common.c +++ b/video/out/wayland_common.c @@ -35,24 +35,24 @@ #include "win_state.h" // Generated from wayland-protocols -#include "generated/wayland/idle-inhibit-unstable-v1.h" -#include "generated/wayland/linux-dmabuf-unstable-v1.h" -#include "generated/wayland/presentation-time.h" -#include "generated/wayland/xdg-decoration-unstable-v1.h" -#include "generated/wayland/xdg-shell.h" -#include "generated/wayland/viewporter.h" +#include "idle-inhibit-unstable-v1.h" +#include "linux-dmabuf-unstable-v1.h" +#include "presentation-time.h" +#include "xdg-decoration-unstable-v1.h" +#include "xdg-shell.h" +#include "viewporter.h" #if HAVE_WAYLAND_PROTOCOLS_1_27 -#include "generated/wayland/content-type-v1.h" -#include "generated/wayland/single-pixel-buffer-v1.h" +#include "content-type-v1.h" +#include "single-pixel-buffer-v1.h" #endif #if HAVE_WAYLAND_PROTOCOLS_1_31 -#include "generated/wayland/fractional-scale-v1.h" +#include "fractional-scale-v1.h" #endif #if HAVE_WAYLAND_PROTOCOLS_1_32 -#include "generated/wayland/cursor-shape-v1.h" +#include "cursor-shape-v1.h" #endif #if WAYLAND_VERSION_MAJOR > 1 || WAYLAND_VERSION_MINOR >= 22 diff --git a/video/out/x11_common.c b/video/out/x11_common.c index b3bdf1c014..03d624ac0c 100644 --- a/video/out/x11_common.c +++ b/video/out/x11_common.c @@ -110,19 +110,19 @@ typedef struct } MotifWmHints; static const char x11_icon_16[] = -#include "generated/etc/mpv-icon-8bit-16x16.png.inc" +#include "etc/mpv-icon-8bit-16x16.png.inc" ; static const char x11_icon_32[] = -#include "generated/etc/mpv-icon-8bit-32x32.png.inc" +#include "etc/mpv-icon-8bit-32x32.png.inc" ; static const char x11_icon_64[] = -#include "generated/etc/mpv-icon-8bit-64x64.png.inc" +#include "etc/mpv-icon-8bit-64x64.png.inc" ; static const char x11_icon_128[] = -#include "generated/etc/mpv-icon-8bit-128x128.png.inc" +#include "etc/mpv-icon-8bit-128x128.png.inc" ; #define ICON_ENTRY(var) { (char *)var, sizeof(var) } |