From 91c323c9fd20bb3b6a194b10b7a26bf6045e391f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Florian=20M=C3=BCllner?= Date: Tue, 12 Mar 2019 01:35:13 +0100 Subject: [PATCH] build: Don't use absolute paths with subdir keyword Meson 0.50.0 made passing an absolute path to install_headers()' subdir keyword a fatal error. This means we have to track both relative (to includedir) paths for header subdirs and absolute paths for generated headers now :-( https://gitlab.gnome.org/GNOME/mutter/merge_requests/492 --- clutter/clutter/meson.build | 9 +++++---- clutter/meson.build | 3 ++- cogl/cogl-gles2/meson.build | 4 ++-- cogl/cogl-pango/meson.build | 4 ++-- cogl/cogl-path/meson.build | 3 ++- cogl/cogl/meson.build | 7 ++++--- cogl/meson.build | 3 ++- src/meson.build | 3 ++- src/meta/meson.build | 2 +- 9 files changed, 22 insertions(+), 16 deletions(-) diff --git a/clutter/clutter/meson.build b/clutter/clutter/meson.build index 879ea1664..671d790df 100644 --- a/clutter/clutter/meson.build +++ b/clutter/clutter/meson.build @@ -1,3 +1,4 @@ +clutter_clutter_includesubdir = join_paths(clutter_includesubdir, 'clutter') clutter_clutter_includedir = join_paths(clutter_includedir, 'clutter') clutter_headers = [ @@ -577,16 +578,16 @@ if have_introspection endif install_headers(clutter_headers, - subdir: clutter_clutter_includedir) + subdir: clutter_clutter_includesubdir) install_headers(cally_headers, - subdir: join_paths(clutter_includedir, 'cally')) + subdir: join_paths(clutter_includesubdir, 'cally')) install_headers(clutter_deprecated_headers, - subdir: join_paths(clutter_clutter_includedir, 'deprecated')) + subdir: join_paths(clutter_clutter_includesubdir, 'deprecated')) install_headers(clutter_x11_headers, - subdir: join_paths(clutter_clutter_includedir, 'x11')) + subdir: join_paths(clutter_clutter_includesubdir, 'x11')) pkg.generate(libmutter_clutter, name: 'Mutters Clutter', diff --git a/clutter/meson.build b/clutter/meson.build index 053cfa751..1397be179 100644 --- a/clutter/meson.build +++ b/clutter/meson.build @@ -1,4 +1,5 @@ -clutter_includedir = join_paths(pkgincludedir, 'clutter') +clutter_includesubdir = join_paths(pkgname, 'clutter') +clutter_includedir = join_paths(includedir, clutter_includesubdir) clutter_srcdir = join_paths(top_srcdir, 'clutter') clutter_builddir = join_paths(builddir, 'clutter') diff --git a/cogl/cogl-gles2/meson.build b/cogl/cogl-gles2/meson.build index d446ca4c5..fbe3eb19f 100644 --- a/cogl/cogl-gles2/meson.build +++ b/cogl/cogl-gles2/meson.build @@ -27,9 +27,9 @@ libmutter_cogl_gles2 = shared_library('mutter-cogl-gles2-' + libmutter_api_versi install: true, ) -cogl_gles2_includedir = join_paths(cogl_includedir, 'cogl-gles2/GLES2') +cogl_gles2_includesubdir = join_paths(cogl_includesubdir, 'cogl-gles2/GLES2') install_headers(cogl_gles2_public_headers, - subdir: cogl_gles2_includedir) + subdir: cogl_gles2_includesubdir) pkg.generate(libmutter_cogl_gles2, name: 'CoglGles2', diff --git a/cogl/cogl-pango/meson.build b/cogl/cogl-pango/meson.build index fb4d26142..787ec0132 100644 --- a/cogl/cogl-pango/meson.build +++ b/cogl/cogl-pango/meson.build @@ -70,8 +70,8 @@ if have_introspection ) endif -cogl_pango_includedir = join_paths(cogl_includedir, 'cogl-pango') -install_headers(cogl_pango_public_headers, subdir: cogl_pango_includedir) +cogl_pango_includesubdir = join_paths(cogl_includesubdir, 'cogl-pango') +install_headers(cogl_pango_public_headers, subdir: cogl_pango_includesubdir) pkg.generate(libmutter_cogl_pango, name: 'CoglPango', diff --git a/cogl/cogl-path/meson.build b/cogl/cogl-path/meson.build index 6faba674e..e086a622f 100644 --- a/cogl/cogl-path/meson.build +++ b/cogl/cogl-path/meson.build @@ -1,3 +1,4 @@ +cogl_path_includesubdir = join_paths(cogl_includesubdir, 'cogl-path') cogl_path_includedir = join_paths(cogl_includedir, 'cogl-path') cogl_path_public_headers = [ @@ -76,7 +77,7 @@ libmutter_cogl_path_dep = declare_dependency( ) install_headers(cogl_path_public_headers, - subdir: cogl_path_includedir) + subdir: cogl_path_includesubdir) pkg.generate(libmutter_cogl_path, name: 'CoglPath', diff --git a/cogl/cogl/meson.build b/cogl/cogl/meson.build index 5d80e8750..6bc64e696 100644 --- a/cogl/cogl/meson.build +++ b/cogl/cogl/meson.build @@ -1,3 +1,4 @@ +cogl_cogl_includesubdir = join_paths(cogl_includesubdir, 'cogl') cogl_cogl_includedir = join_paths(cogl_includedir, 'cogl') cdata = configuration_data() @@ -514,16 +515,16 @@ install_headers([ cogl_headers, cogl_nonintrospected_headers, ], - subdir: cogl_cogl_includedir) + subdir: cogl_cogl_includesubdir) install_headers([ cogl_deprecated_headers, cogl_deprecated_nonintrospected_headers, ], - subdir: join_paths(cogl_cogl_includedir, 'deprecated')) + subdir: join_paths(cogl_cogl_includesubdir, 'deprecated')) install_headers(cogl_gl_prototype_headers, - subdir: join_paths(cogl_cogl_includedir, 'gl-prototypes')) + subdir: join_paths(cogl_cogl_includesubdir, 'gl-prototypes')) pkg.generate(libmutter_cogl, name: 'Cogl', diff --git a/cogl/meson.build b/cogl/meson.build index d76b86589..356d596f5 100644 --- a/cogl/meson.build +++ b/cogl/meson.build @@ -1,4 +1,5 @@ -cogl_includedir = join_paths(pkgincludedir, 'cogl') +cogl_includesubdir = join_paths(pkgname, 'cogl') +cogl_includedir = join_paths(includedir, cogl_includesubdir) cogl_srcdir = join_paths(top_srcdir, 'cogl') cogl_builddir = join_paths(builddir, 'cogl') diff --git a/src/meson.build b/src/meson.build index 8779c956e..9919b5cfb 100644 --- a/src/meson.build +++ b/src/meson.build @@ -1,4 +1,5 @@ -mutter_includedir = join_paths(pkgincludedir, 'meta') +mutter_includesubdir = join_paths(pkgname, 'meta') +mutter_includedir = join_paths(includedir, mutter_includesubdir) mutter_includes = [ include_directories('.'), diff --git a/src/meta/meson.build b/src/meta/meson.build index 53c4723a2..2bd50e4f7 100644 --- a/src/meta/meson.build +++ b/src/meta/meson.build @@ -48,7 +48,7 @@ if have_x11 endif install_headers(mutter_public_headers, - subdir: mutter_includedir + subdir: mutter_includesubdir ) mutter_public_header_files = files(mutter_public_headers) -- 2.21.0