summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorXavier Claessens <xavier.claessens@collabora.com>2021-03-25 16:39:52 -0400
committerXavier Claessens <xavier.claessens@collabora.com>2021-03-25 16:42:31 -0400
commit0c414e34113fca089a67eb1beadfcdce722a89db (patch)
tree4cf2c54bd97449192cc2197fae7486915fb54e12
parent7a8256eb734509f4a2907fe4b5ea58b885edb5b1 (diff)
downloadgobject-introspection-0c414e34113fca089a67eb1beadfcdce722a89db.tar.gz
Meson: Fix build when gobject-introspection is a subproject
meson.source_root() return the root of the main project, but in this case we want the root of the gobject-introspection (sub)project.
-rw-r--r--tests/offsets/meson.build12
1 files changed, 6 insertions, 6 deletions
diff --git a/tests/offsets/meson.build b/tests/offsets/meson.build
index 71f4c8a4..f6a497f6 100644
--- a/tests/offsets/meson.build
+++ b/tests/offsets/meson.build
@@ -24,8 +24,8 @@ if glib_dep.type_name() == 'pkgconfig'
'--output=@OUTPUT@',
'--no-libtool',
'--reparse-validate',
- '--add-include-path', join_paths(meson.source_root(), 'gir'),
- '--add-include-path', join_paths(meson.build_root(), 'gir'),
+ '--add-include-path', join_paths(source_root, 'gir'),
+ '--add-include-path', join_paths(build_root, 'gir'),
'--warn-all',
'--warn-error',
'--namespace=Offsets',
@@ -34,7 +34,7 @@ if glib_dep.type_name() == 'pkgconfig'
'--library=offsets-1.0',
'-L', meson.current_build_dir(),
'-I', meson.current_source_dir(),
- '-I', join_paths(meson.source_root(), 'tests'),
+ '-I', join_paths(source_root, 'tests'),
extra_giscanner_args,
'@INPUT@',
]
@@ -46,7 +46,7 @@ if glib_dep.type_name() == 'pkgconfig'
output: '@BASENAME@.typelib',
depends: [gobject_gir, ],
command: [gircompiler, '-o', '@OUTPUT@', '@INPUT@',
- '--includedir', join_paths(meson.build_root(), 'gir'),
+ '--includedir', join_paths(build_root, 'gir'),
'--includedir', meson.current_build_dir()
],
)
@@ -58,10 +58,10 @@ if glib_dep.type_name() == 'pkgconfig'
)
test_offsets_env = environment()
- test_offsets_env.set('top_builddir', join_paths(meson.build_root(), 'gir'))
+ test_offsets_env.set('top_builddir', join_paths(build_root, 'gir'))
test_offsets_env.set('builddir', meson.current_build_dir())
if host_system == 'windows'
- test_offsets_env.prepend('PATH', join_paths(meson.build_root(), 'girepository'))
+ test_offsets_env.prepend('PATH', join_paths(build_root, 'girepository'))
endif
test('test_offsets.py',