[vala/wip/meson: 12/14] Pass LD_LIBRARY_PATH as "env" where needed




commit 5fedbc588ddf4552c523eca1ba9af0da1e930ad5
Author: Rico Tzschichholz <ricotz ubuntu com>
Date:   Sun Feb 7 22:03:21 2021 +0100

    Pass LD_LIBRARY_PATH as "env" where needed

 doc/meson.build           | 3 +++
 tests/meson.build         | 1 +
 valadoc/tests/meson.build | 6 ++++++
 3 files changed, 10 insertions(+)
---
diff --git a/doc/meson.build b/doc/meson.build
index 40519581d..c5763e518 100644
--- a/doc/meson.build
+++ b/doc/meson.build
@@ -17,6 +17,7 @@ if help2man.found() and get_option('manpages')
                        '--include', join_paths(meson.current_source_dir(), 'valac.h2m'),
                        '--no-info', '--output=@OUTPUT@', valac_exe
                ],
+               env: 'LD_LIBRARY_PATH=' + join_paths(meson.build_root(), 'vala') + ':' + 
join_paths(meson.build_root(), 'codegen'),
                install: true,
                install_dir: man_1_dir,
        )
@@ -26,6 +27,7 @@ if help2man.found() and get_option('manpages')
                        '--include', join_paths(meson.current_source_dir(), 'vapigen.h2m'),
                        '--no-info', '--output=@OUTPUT@', vapigen_exe
                ],
+               env: 'LD_LIBRARY_PATH=' + join_paths(meson.build_root(), 'vala') + ':' + 
join_paths(meson.build_root(), 'codegen'),
                install: true,
                install_dir: man_1_dir,
        )
@@ -36,6 +38,7 @@ if help2man.found() and get_option('manpages')
                                '--include', join_paths(meson.current_source_dir(), 'valadoc.h2m'),
                                '--no-info', '--output=@OUTPUT@', valadoc_exe
                        ],
+                       env: 'LD_LIBRARY_PATH=' + join_paths(meson.build_root(), 'vala') + ':' + 
join_paths(meson.build_root(), 'codegen') + ':' + join_paths(meson.build_root(), 'libvaladoc'),
                        install: true,
                        install_dir: man_1_dir,
                )
diff --git a/tests/meson.build b/tests/meson.build
index 2dd272fb3..ec67b755a 100644
--- a/tests/meson.build
+++ b/tests/meson.build
@@ -1266,6 +1266,7 @@ vala_flags = [
 
 test_envars = [
        'G_DEBUG=fatal-warnings',
+       'LD_LIBRARY_PATH=' + join_paths(meson.build_root(), 'vala') + ':' + join_paths(meson.build_root(), 
'codegen'),
 ]
 
 foreach flag : supported_test_cflags
diff --git a/valadoc/tests/meson.build b/valadoc/tests/meson.build
index 6c6be7dd5..7e5349307 100644
--- a/valadoc/tests/meson.build
+++ b/valadoc/tests/meson.build
@@ -37,6 +37,11 @@ vala_flags = [
        join_paths(meson.source_root(), 'valadoc', 'tests', 'libvaladoc', 'parser-generic-scanner.vala'),
 ]
 
+test_envars = [
+       'G_DEBUG=fatal-warnings',
+       'LD_LIBRARY_PATH=' + join_paths(meson.build_root(), 'vala') + ':' + join_paths(meson.build_root(), 
'codegen') + ':' + join_paths(meson.build_root(), 'libvaladoc'),
+]
+
 foreach flag : supported_test_cflags
        vala_flags += ['-X', flag]
 endforeach
@@ -46,6 +51,7 @@ foreach case : test_cases
                valac_exe,
                workdir: meson.current_build_dir(),
                args: vala_flags + [join_paths(meson.current_source_dir(), case)],
+               env: test_envars,
                depends: [valacore_lib, libvaladoc_lib]
        )
 endforeach


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]