William A. Kennington III | ac69b48 | 2021-06-02 12:28:27 -0700 | [diff] [blame] | 1 | From 4ef5c91697a141fea7317aff7f0f28e5a861db99 Mon Sep 17 00:00:00 2001 |
| 2 | From: Xavier Claessens <xavier.claessens@collabora.com> |
| 3 | Date: Mon, 26 Apr 2021 14:25:03 -0400 |
| 4 | Subject: [PATCH] gstgl: Fix build when Meson >= 0.58.0rc1 |
| 5 | |
| 6 | "implicit_include_directories: false" now also means that current build |
| 7 | directory is not added to include paths by default any more. We have to |
| 8 | add it manually because we have some custom_target() that generate |
| 9 | headers in current build directory. |
| 10 | |
| 11 | See https://github.com/mesonbuild/meson/issues/8700. |
| 12 | |
| 13 | Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-base/-/merge_requests/1125> |
| 14 | Upstream-Status: Backport |
| 15 | Signed-off-by: Alexander Kanavin <alex.kanavin@gmail.com> |
| 16 | --- |
| 17 | gst-libs/gst/gl/meson.build | 15 ++++++++++++--- |
| 18 | 1 file changed, 12 insertions(+), 3 deletions(-) |
| 19 | |
| 20 | diff --git a/gst-libs/gst/gl/meson.build b/gst-libs/gst/gl/meson.build |
| 21 | index 66668644e..53891625a 100644 |
| 22 | --- a/gst-libs/gst/gl/meson.build |
| 23 | +++ b/gst-libs/gst/gl/meson.build |
| 24 | @@ -1004,11 +1004,20 @@ if build_gstgl |
| 25 | command : [mkenums, glib_mkenums, '@OUTPUT@', '@INPUT@']) |
| 26 | gen_sources = [gl_enumtypes_h] |
| 27 | |
| 28 | + common_args = gst_plugins_base_args + gl_cpp_args + ['-DBUILDING_GST_GL'] |
| 29 | + |
| 30 | + # We have custom_target() that generate headers in the current build dir, |
| 31 | + # but with implicit_include_directories: false, meson >= 0.58.0 won't include |
| 32 | + # it by default. We cannot use include_directories('.') here because it would |
| 33 | + # also include current source dir which is what we want to avoid because |
| 34 | + # case-insensitive FS would include gst-libs/gl/egl/egl.h as EGL/egl.h. |
| 35 | + common_args += '-I@0@'.format(meson.current_build_dir()) |
| 36 | + |
| 37 | gstgl = library('gstgl-' + api_version, |
| 38 | gl_sources, gl_egl_sources, gl_x11_sources, gl_wayland_sources, gl_priv_sources, gl_enumtypes_c, gl_enumtypes_h, |
| 39 | - c_args : gst_plugins_base_args + gl_cpp_args + ['-DBUILDING_GST_GL'], |
| 40 | - cpp_args : gst_plugins_base_args + gl_cpp_args + ['-DBUILDING_GST_GL'], |
| 41 | - objc_args : gst_plugins_base_args + gl_cpp_args + gl_objc_args + ['-DBUILDING_GST_GL'], |
| 42 | + c_args : common_args, |
| 43 | + cpp_args : common_args, |
| 44 | + objc_args : common_args + gl_objc_args, |
| 45 | include_directories : [configinc, libsinc, gl_includes], |
| 46 | version : libversion, |
| 47 | soversion : soversion, |
| 48 | -- |
| 49 | GitLab |
| 50 | |