[babl] build: add build path variables - add build path variables for library and extensions



commit de4587169edaa7c693f46a799d11cfa4a0d63806
Author: John Marshall <jtm home gmail com>
Date:   Wed May 27 12:20:10 2020 +0100

    build: add build path variables
      - add build path variables for library and extensions

 babl/meson.build       | 2 ++
 docs/meson.build       | 8 ++++----
 extensions/meson.build | 2 ++
 tests/meson.build      | 6 +++---
 4 files changed, 11 insertions(+), 7 deletions(-)
---
diff --git a/babl/meson.build b/babl/meson.build
index 6feb107ba..37d2e4d77 100644
--- a/babl/meson.build
+++ b/babl/meson.build
@@ -1,3 +1,5 @@
+babl_library_build_dir = meson.current_build_dir()
+
 bablInclude = include_directories('.')
 subdir('base')
 
diff --git a/docs/meson.build b/docs/meson.build
index 74984b0c5..4a771b5ff 100644
--- a/docs/meson.build
+++ b/docs/meson.build
@@ -23,14 +23,14 @@ babl_css = configure_file(
 )
 
 index_html_tmp_env = [
-  'BABL_PATH=' + meson.build_root() / 'extensions',
+  'BABL_PATH=' + babl_extensions_build_dir,
 ]
 
 # Don't build babl ref if cannot run compiled objects in this env
-if env_bin.found() and cc_can_run # and not meson.is_cross_build()
+if env_bin.found() and cc_can_run
   index_html_tmp = custom_target('index.html.tmp',
-    input : [ babl_html_dump, ],
-    output: [ 'index.html.tmp', ],
+    input : babl_html_dump,
+    output:'index.html.tmp',
     command: [
       env_bin,
       index_html_tmp_env,
diff --git a/extensions/meson.build b/extensions/meson.build
index acfbbcb97..8d9606643 100644
--- a/extensions/meson.build
+++ b/extensions/meson.build
@@ -1,3 +1,5 @@
+babl_extensions_build_dir = meson.current_build_dir()
+
 no_cflags = []
 
 # Dependencies
diff --git a/tests/meson.build b/tests/meson.build
index 4431ed81e..8be32f7ed 100644
--- a/tests/meson.build
+++ b/tests/meson.build
@@ -34,9 +34,9 @@ if platform_unix
 endif
 
 test_env = environment()
-test_env.prepend('LD_LIBRARY_PATH', join_paths(meson.build_root(), 'babl'))
-test_env.set('GI_TYPELIB_PATH', join_paths(meson.build_root(), 'babl'))
-test_env.set('BABL_PATH', join_paths(meson.build_root(), 'extensions'))
+test_env.prepend('LD_LIBRARY_PATH', babl_library_build_dir)
+test_env.set('GI_TYPELIB_PATH', babl_library_build_dir)
+test_env.set('BABL_PATH', babl_extensions_build_dir)
 foreach test_name : test_names
   test = executable(
     test_name,


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