summaryrefslogtreecommitdiff
path: root/tests
diff options
context:
space:
mode:
authorXavier Claessens <xavier.claessens@collabora.com>2020-05-06 14:24:34 -0400
committerXavier Claessens <xavier.claessens@collabora.com>2020-05-06 14:24:34 -0400
commitf8e080d03bb490e3539a2a7e0c4a5e7a20fcd863 (patch)
treef1eec668d91f881e047869352350db7b9c6ea5f6 /tests
parent769f886bfa3c7b21815def592eec7279bb123f23 (diff)
downloadgobject-introspection-f8e080d03bb490e3539a2a7e0c4a5e7a20fcd863.tar.gz
Meson: Fix build as subproject
meson.build_root() is the root of the main project, better use meson.current_build_dir() instead.
Diffstat (limited to 'tests')
-rw-r--r--tests/meson.build10
-rw-r--r--tests/repository/meson.build10
-rw-r--r--tests/scanner/meson.build40
-rw-r--r--tests/warn/meson.build8
4 files changed, 34 insertions, 34 deletions
diff --git a/tests/meson.build b/tests/meson.build
index f4c57ed7..b240749e 100644
--- a/tests/meson.build
+++ b/tests/meson.build
@@ -115,8 +115,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=Everything',
@@ -141,8 +141,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=GIMarshallingTests',
@@ -163,7 +163,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()
],
)
diff --git a/tests/repository/meson.build b/tests/repository/meson.build
index 497ab106..17445381 100644
--- a/tests/repository/meson.build
+++ b/tests/repository/meson.build
@@ -10,17 +10,17 @@ if glib_dep.type_name() == 'pkgconfig'
repository_test_env = environment()
repository_test_env.prepend(
'GI_TYPELIB_PATH',
- join_paths(meson.build_root(), 'gir'),
- join_paths(meson.build_root(), 'tests'),
- join_paths(meson.build_root(), 'tests', 'scanner'),
+ join_paths(build_root, 'gir'),
+ join_paths(build_root, 'tests'),
+ join_paths(build_root, 'tests', 'scanner'),
)
repository_test_env.prepend(
'LD_LIBRARY_PATH',
- join_paths(meson.build_root(), 'tests', 'scanner'),
+ join_paths(build_root, 'tests', 'scanner'),
)
if host_system == 'windows'
repository_test_env.prepend(
- 'PATH', join_paths(meson.build_root(), 'tests', 'scanner'))
+ 'PATH', join_paths(build_root, 'tests', 'scanner'))
endif
custom_c_args = cc.get_supported_arguments([
diff --git a/tests/scanner/meson.build b/tests/scanner/meson.build
index 50ca5a2b..fa7f7eca 100644
--- a/tests/scanner/meson.build
+++ b/tests/scanner/meson.build
@@ -106,7 +106,7 @@ python_path = run_command(python, ['-c', 'import sys; sys.stdout.write(sys.execu
gircompiler_command = [
gircompiler, '-o', '@OUTPUT@', '@INPUT@',
- '--includedir', join_paths(meson.build_root(), 'gir'),
+ '--includedir', join_paths(build_root, 'gir'),
'--includedir', meson.current_build_dir(),
]
@@ -122,8 +122,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=Typedefs',
@@ -162,8 +162,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=Bar',
@@ -173,7 +173,7 @@ if glib_dep.type_name() == 'pkgconfig'
'--library=barapp-1.0',
'--accept-unprefixed',
'-L', meson.current_build_dir(),
- '-L', join_paths(meson.build_root(), 'girepository'),
+ '-L', join_paths(build_root, 'girepository'),
'-I', meson.current_source_dir(),
'-I', join_paths(meson.current_source_dir(), '..'),
extra_giscanner_args,
@@ -201,8 +201,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=SLetter',
@@ -239,8 +239,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'),
'--namespace=WarnLib',
'--nsversion=1.0',
'--include=Gio-2.0',
@@ -275,8 +275,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=Utility',
@@ -313,8 +313,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=GtkFrob',
@@ -352,8 +352,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'),
'--namespace=GetType',
'--nsversion=1.0',
'--identifier-prefix=GetType',
@@ -483,8 +483,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'),
'--add-include-path', meson.current_build_dir(),
'--namespace=Regress',
'--nsversion=1.0',
@@ -542,7 +542,7 @@ if has_girdoctool and glib_dep.type_name() == 'pkgconfig'
output: 'Regress-1.0-' + language,
command: [
python, girdoctool,
- '--add-include-path=' + join_paths(meson.build_root(), 'gir'),
+ '--add-include-path=' + join_paths(build_root, 'gir'),
'--add-include-path=' + meson.current_build_dir(),
'--language', language,
'@INPUT@', '-o', '@OUTPUT@'],
@@ -570,7 +570,7 @@ if has_girdoctool and glib_dep.type_name() == 'pkgconfig'
output: 'Regress-1.0-sections.txt',
command: [
python, girdoctool,
- '--add-include-path=' + join_paths(meson.build_root(), 'gir'),
+ '--add-include-path=' + join_paths(build_root, 'gir'),
'--add-include-path=' + meson.current_build_dir(),
'--write-sections-file',
'@INPUT@', '-o', '@OUTPUT@'],
diff --git a/tests/warn/meson.build b/tests/warn/meson.build
index 1f144e70..9641787f 100644
--- a/tests/warn/meson.build
+++ b/tests/warn/meson.build
@@ -21,12 +21,12 @@ warn_tests = [
]
warn_test_env = environment()
-warn_test_env.set('UNINSTALLED_INTROSPECTION_SRCDIR', meson.source_root())
-warn_test_env.set('TOP_BUILDDIR', meson.build_root())
+warn_test_env.set('UNINSTALLED_INTROSPECTION_SRCDIR', source_root)
+warn_test_env.set('TOP_BUILDDIR', build_root)
warn_test_env.set(
'PYTHONPATH',
- meson.build_root(),
- join_paths(meson.build_root(), 'giscanner'))
+ build_root,
+ join_paths(build_root, 'giscanner'))
# FIXME: Glib as a subproject (used on Windows mostly).
if glib_dep.type_name() == 'pkgconfig'