[libgda] Meson subproject: fix top src and build dirs



commit 60be14e0ee4e34baa756df6623ef53b906c455d8
Author: Daniel Espinosa <esodan gmail com>
Date:   Tue Apr 9 11:07:49 2019 -0500

    Meson subproject: fix top src and build dirs

 libgda/meson.build                               | 29 ++++++------
 libgda/sqlite/meson.build                        |  2 +-
 meson.build                                      |  4 ++
 providers/ldap/meson.build                       |  4 +-
 providers/mysql/meson.build                      |  2 +-
 providers/postgres/meson.build                   |  2 +-
 providers/skel-implementation/capi/meson.build   |  2 +-
 providers/skel-implementation/models/meson.build |  4 +-
 providers/sqlcipher/meson.build                  |  2 +-
 providers/sqlite/meson.build                     |  2 +-
 providers/web/meson.build                        |  2 +-
 tests/data-models/meson.build                    | 40 ++++++++--------
 tests/db/meson.build                             | 56 +++++++++++------------
 tests/meson.build                                | 48 ++++++++++----------
 tests/meta-store/meson.build                     | 32 ++++++-------
 tests/multi-threading/meson.build                | 16 +++----
 tests/parser/meson.build                         | 48 ++++++++++----------
 tests/providers/meson.build                      | 58 ++++++++++++------------
 tests/ui/meson.build                             | 14 +++---
 tests/value-holders/meson.build                  | 24 +++++-----
 20 files changed, 197 insertions(+), 194 deletions(-)
---
diff --git a/libgda/meson.build b/libgda/meson.build
index 774740c72..e4bec0618 100644
--- a/libgda/meson.build
+++ b/libgda/meson.build
@@ -1,7 +1,6 @@
 inc_libgdah = include_directories ('.')
 inc_libgdah_dep = declare_dependency (include_directories : inc_libgdah)
 
-
 # Build auxiliary executables and libraries
 subdir('sqlite')
 subdir('sql-parser')
@@ -303,7 +302,7 @@ libgda_dep += [inc_libgdah_dep]
 
 libgda_cargs = [
                '-include',
-               meson.build_root() + '/config.h',
+               join_paths(gda_top_build, 'config.h'),
                '-DABI_VERSION='+project_api_version,
                '-DABI_NAME='+project_api_name,
        ]
@@ -439,15 +438,15 @@ tco = executable('test_cnc_open', 'test-cnc-open.c',
        )
 test('OpenConnection', tco,
        env: [
-               'GDA_TOP_SRC_DIR='+meson.source_root(),
-               'GDA_TOP_BUILD_DIR='+meson.build_root(),
+               'GDA_TOP_SRC_DIR='+gda_top_src,
+               'GDA_TOP_BUILD_DIR='+gda_top_build,
                'GDA_SHOW_PROVIDER_LOADING_ERROR=1'
                ]
        )
 
 tce = executable('test_cnc_exec', 'test-cnc-exec.c',
        c_args: [
-               '-DROOT_DIR="'+meson.source_root()+'"'
+               '-DROOT_DIR="'+gda_top_src+'"'
                ],
        dependencies: [
                libgda_dep,
@@ -458,14 +457,14 @@ tce = executable('test_cnc_exec', 'test-cnc-exec.c',
        )
 test('OpenConnectionExecute', tce,
        env: [
-               'GDA_TOP_SRC_DIR='+meson.source_root(),
-               'GDA_TOP_BUILD_DIR='+meson.build_root()
+               'GDA_TOP_SRC_DIR='+gda_top_src,
+               'GDA_TOP_BUILD_DIR='+gda_top_build
                ]
        )
 
 tcm = executable('test_cnc_meta', 'test-cnc-meta.c',
        c_args: [
-               '-DROOT_DIR="'+meson.source_root()+'"'
+               '-DROOT_DIR="'+gda_top_src+'"'
                ],
        dependencies: [
                libgda_dep,
@@ -476,8 +475,8 @@ tcm = executable('test_cnc_meta', 'test-cnc-meta.c',
        )
 test('OpenConnectionMeta', tcm,
        env: [
-               'GDA_TOP_SRC_DIR='+meson.source_root(),
-               'GDA_TOP_BUILD_DIR='+meson.build_root()
+               'GDA_TOP_SRC_DIR='+gda_top_src,
+               'GDA_TOP_BUILD_DIR='+gda_top_build
                ]
        )
 
@@ -486,7 +485,7 @@ ttw = executable('test-raw-itsignaler',
        test_raw_itsignaler_sources,
        c_args: [
                '-include',
-               'config.h',
+               join_paths(gda_top_build, 'config.h'),
                ],
        dependencies: [
                libgda_dep,
@@ -501,7 +500,7 @@ ttws = executable('test-itsignaler',
        test_itsignaler_sources,
        c_args: [
                '-include',
-               'config.h',
+               join_paths(gda_top_build, 'config.h'),
                ],
        dependencies: [
                libgda_dep,
@@ -515,7 +514,7 @@ test('ItSignaler', ttws)
 ttwbs = executable('test-blocking-itsignaler',
        test_block_itsignaler_sources,
        c_args: [
-               '-include','config.h',
+               '-include',join_paths(gda_top_build, 'config.h'),
                ],
        dependencies: [
                libgda_dep,
@@ -530,7 +529,7 @@ ttww = executable('test-worker',
        test_worker_sources,
        c_args: [
                '-include',
-               'config.h',
+               join_paths(gda_top_build, 'config.h'),
                ],
        dependencies: [
                libgda_dep,
@@ -545,7 +544,7 @@ ttwd = executable('test-connect',
        test_worker_sources,
        c_args: [
                '-include',
-               'config.h',
+               join_paths(gda_top_build, 'config.h'),
                ],
        dependencies: [
                libgda_dep,
diff --git a/libgda/sqlite/meson.build b/libgda/sqlite/meson.build
index b698d90ba..ddbf5f3f2 100644
--- a/libgda/sqlite/meson.build
+++ b/libgda/sqlite/meson.build
@@ -51,7 +51,7 @@ sqlitesources += sqlitehanderbinh
 
 sqlite_cargs = [
                '-include',
-               meson.build_root() + '/config.h',
+               join_paths(gda_top_build, 'config.h'),
                '-DPNAME="SQLite"', '-DCLASS_PREFIX="GdaSqlite"'
        ]
 sqlite_path = ''
diff --git a/meson.build b/meson.build
index 5a1bfcd7f..96bf9e422 100644
--- a/meson.build
+++ b/meson.build
@@ -36,6 +36,10 @@ LT_VERSION='6'
 
 compiler = meson.get_compiler('c')
 
+# Use this variables to access top source and top build dirs when used as subproject
+gda_top_src = meson.current_source_dir()
+gda_top_build = meson.current_build_dir()
+
 glib_genmarshal = find_program('glib-genmarshal', required : true)
 
 glib_mkenums = find_program('glib-mkenums', required : true)
diff --git a/providers/ldap/meson.build b/providers/ldap/meson.build
index d5fce6844..079ce1ee2 100644
--- a/providers/ldap/meson.build
+++ b/providers/ldap/meson.build
@@ -96,7 +96,7 @@ libgda_ldap_provider = library ('gda-ldap-'+project_api_version,
                ],
        c_args: [
                '-include',
-               meson.build_root() + '/config.h',
+               join_paths(gda_top_build, 'config.h'),
                ],
        link_args: [
                '-export-dynamic',
@@ -104,4 +104,4 @@ libgda_ldap_provider = library ('gda-ldap-'+project_api_version,
        link_with: libgda,
        install: true,
        install_dir: join_paths(get_option('libdir'), project_package, 'providers')
-       )
\ No newline at end of file
+       )
diff --git a/providers/mysql/meson.build b/providers/mysql/meson.build
index 5b9f4e3db..3e358d050 100644
--- a/providers/mysql/meson.build
+++ b/providers/mysql/meson.build
@@ -125,7 +125,7 @@ libgda_mysql_sources += libgda_reusable_mysql_sources
 
 mysql_args += [
        '-include',
-       meson.build_root() + '/config.h',
+       join_paths(gda_top_build, 'config.h'),
        '-DCLASS_PREFIX="GdaMySQL"'
        ]
 
diff --git a/providers/postgres/meson.build b/providers/postgres/meson.build
index a91901f91..4231502f8 100644
--- a/providers/postgres/meson.build
+++ b/providers/postgres/meson.build
@@ -101,7 +101,7 @@ libgda_postgres_sources += libgda_pg_sources
 
 libgda_postgres_cargs = [
                '-include',
-               meson.build_root() + '/config.h',
+               join_paths(gda_top_build, 'config.h'),
                ]
 
 libgda_postgres_cargs += c_args
diff --git a/providers/skel-implementation/capi/meson.build b/providers/skel-implementation/capi/meson.build
index c39c777ad..93feec98f 100644
--- a/providers/skel-implementation/capi/meson.build
+++ b/providers/skel-implementation/capi/meson.build
@@ -143,7 +143,7 @@ libgda_capi_sources += capi_token_types
 
 libgda_capi_provider_cargs = [
                '-include',
-               meson.build_root() + '/config.h',
+               join_paths(gda_top_build, 'config.h'),
                ]
 
 libgda_capi_provider_cargs += c_args
diff --git a/providers/skel-implementation/models/meson.build 
b/providers/skel-implementation/models/meson.build
index 008940057..2d46d9644 100644
--- a/providers/skel-implementation/models/meson.build
+++ b/providers/skel-implementation/models/meson.build
@@ -11,7 +11,7 @@ foreach xt : models_xml_fnames
                input: xt+'.xml.in',
                output: xt+'.xml.in.h',
                type: 'xml',
-               po_dir: join_paths(meson.build_root(),'po')
+               po_dir: join_paths(gda_top_build,'po')
                )
        models_xml_res += custom_target(xt+'.raw.xml',
                command: [raw_spec,
@@ -53,7 +53,7 @@ libgda_sqlite_providerpc = configure_file(
 
 libgda_models_provider_cargs = [
                '-include',
-               meson.build_root() + '/config.h',
+               join_paths(gda_top_build, 'config.h'),
                ]
 libgda_models_provider_cargs += c_args
 
diff --git a/providers/sqlcipher/meson.build b/providers/sqlcipher/meson.build
index 87ce1b0fe..e7b3be8fb 100644
--- a/providers/sqlcipher/meson.build
+++ b/providers/sqlcipher/meson.build
@@ -87,7 +87,7 @@ sqlcipher_cargs += ['-DSEARCH_LIB_PATH="'+sqlcipher_path+'"']
 
 sqlcipher_cargs += [
                '-include',
-               meson.build_root() + '/config.h',
+               join_paths(gda_top_build, 'config.h'),
                '-DSQLITE_HAS_CODEC',
                '-DSQLITE_API=',
                '-DSQLITE_PRIVATE=',
diff --git a/providers/sqlite/meson.build b/providers/sqlite/meson.build
index c80bef175..cdc778f61 100644
--- a/providers/sqlite/meson.build
+++ b/providers/sqlite/meson.build
@@ -65,7 +65,7 @@ libgda_sqlite_providerpc = configure_file(output : 'libgda-sqlite-'+project_api_
 
 libgda_sqlite_provider_cargs = [
                '-include',
-               'config.h',
+               join_paths(gda_top_build, 'config.h'),
                '-I'+join_paths(get_option ('prefix'), get_option('includedir'))
                ]
 libgda_sqlite_provider_cargs += c_args
diff --git a/providers/web/meson.build b/providers/web/meson.build
index 521b77625..532ef2070 100644
--- a/providers/web/meson.build
+++ b/providers/web/meson.build
@@ -99,7 +99,7 @@ libgda_web_provider = library ('gda-web-'+project_api_version,
                ],
        c_args: [
                '-include',
-               meson.build_root() + '/config.h',
+               join_paths(gda_top_build, 'config.h'),
                ],
        link_args: [
                '-export-dynamic',
diff --git a/tests/data-models/meson.build b/tests/data-models/meson.build
index 9b7967eae..dc9cfa603 100644
--- a/tests/data-models/meson.build
+++ b/tests/data-models/meson.build
@@ -27,8 +27,8 @@ tchki = executable('check_model_import',
        )
 test('ModelImport', tchki,
        env: [
-               'GDA_TOP_SRC_DIR='+meson.source_root(),
-               'GDA_TOP_BUILD_DIR='+meson.build_root()
+               'GDA_TOP_SRC_DIR='+gda_top_src,
+               'GDA_TOP_BUILD_DIR='+gda_top_build
                ]
        )
 
@@ -45,8 +45,8 @@ tchkv = executable('check_virtual',
        )
 test('Virtual', tchkv,
        env: [
-               'GDA_TOP_SRC_DIR='+meson.source_root(),
-               'GDA_TOP_BUILD_DIR='+meson.build_root()
+               'GDA_TOP_SRC_DIR='+gda_top_src,
+               'GDA_TOP_BUILD_DIR='+gda_top_build
                ]
        )
 
@@ -65,8 +65,8 @@ test('DataProxy', tchkdp,
        timeout: 100,
        workdir: meson.current_build_dir(),
        env: [
-               'GDA_TOP_SRC_DIR='+meson.source_root(),
-               'GDA_TOP_BUILD_DIR='+meson.build_root()
+               'GDA_TOP_SRC_DIR='+gda_top_src,
+               'GDA_TOP_BUILD_DIR='+gda_top_build
                ]
        )
 
@@ -83,8 +83,8 @@ tchkmc = executable('check_model_copy',
        )
 test('ModelCopy', tchkmc,
        env: [
-               'GDA_TOP_SRC_DIR='+meson.source_root(),
-               'GDA_TOP_BUILD_DIR='+meson.build_root()
+               'GDA_TOP_SRC_DIR='+gda_top_src,
+               'GDA_TOP_BUILD_DIR='+gda_top_build
                ]
        )
 
@@ -103,8 +103,8 @@ tchkpm = executable('check_pmodel',
 test('PModel', tchkpm,
        timeout: 200,
        env: [
-               'GDA_TOP_SRC_DIR='+meson.source_root(),
-               'GDA_TOP_BUILD_DIR='+meson.build_root()
+               'GDA_TOP_SRC_DIR='+gda_top_src,
+               'GDA_TOP_BUILD_DIR='+gda_top_build
                ],
        is_parallel: false
        )
@@ -123,8 +123,8 @@ tchkemrs = executable('check_empty_rs',
        )
 test('EmptyRS', tchkemrs,
        env: [
-               'GDA_TOP_SRC_DIR='+meson.source_root(),
-               'GDA_TOP_BUILD_DIR='+meson.build_root()
+               'GDA_TOP_SRC_DIR='+gda_top_src,
+               'GDA_TOP_BUILD_DIR='+gda_top_build
                ]
        )
 
@@ -142,8 +142,8 @@ tchkmerr = executable('check_model_errors',
        )
 test('ModelErrors', tchkmerr,
        env: [
-               'GDA_TOP_SRC_DIR='+meson.source_root(),
-               'GDA_TOP_BUILD_DIR='+meson.build_root()
+               'GDA_TOP_SRC_DIR='+gda_top_src,
+               'GDA_TOP_BUILD_DIR='+gda_top_build
                ]
        )
 tchkvcnc = executable('check_vcnc',
@@ -161,8 +161,8 @@ tchkvcnc = executable('check_vcnc',
 test('VirtualConnection', tchkvcnc,
        timeout: 300,
        env: [
-               'GDA_TOP_SRC_DIR='+meson.source_root(),
-               'GDA_TOP_BUILD_DIR='+meson.build_root()
+               'GDA_TOP_SRC_DIR='+gda_top_src,
+               'GDA_TOP_BUILD_DIR='+gda_top_build
                ]
        )
 
@@ -185,8 +185,8 @@ tchkpivot = executable('check_pivot',
        )
 test('Pivot', tchkpivot,
        env: [
-               'GDA_TOP_SRC_DIR='+meson.source_root(),
-               'GDA_TOP_BUILD_DIR='+meson.build_root()
+               'GDA_TOP_SRC_DIR='+gda_top_src,
+               'GDA_TOP_BUILD_DIR='+gda_top_build
                ]
        )
 
@@ -210,7 +210,7 @@ tchkdsi = executable('check_data_select_iter',
 
 test('DataSelectIter', tchkdsi,
        env: [
-               'GDA_TOP_SRC_DIR='+meson.source_root(),
-               'GDA_TOP_BUILD_DIR='+meson.build_root()
+               'GDA_TOP_SRC_DIR='+gda_top_src,
+               'GDA_TOP_BUILD_DIR='+gda_top_build
                ]
        )
diff --git a/tests/db/meson.build b/tests/db/meson.build
index a6271d652..7a44dd65f 100644
--- a/tests/db/meson.build
+++ b/tests/db/meson.build
@@ -9,9 +9,9 @@ tbc = executable('check-db-catalog',
        db_sources,
        c_args: [
                '-include',
-               meson.build_root() + '/config.h',
+               join_paths(gda_top_build, 'config.h'),
                '-DCHECK_FILES="'+meson.source_root()+'"',
-               '-DTOP_BUILD_DIR="'+meson.build_root()+'"'
+               '-DTOP_BUILD_DIR="'+gda_top_build+'"'
                ],
        link_with: libgda,
        dependencies: [
@@ -24,8 +24,8 @@ tbc = executable('check-db-catalog',
 test('dbcatalog', tbc,
        timeout: 300,
        env: [
-               'GDA_TOP_SRC_DIR='+meson.source_root(),
-               'GDA_TOP_BUILD_DIR='+meson.build_root()
+               'GDA_TOP_SRC_DIR='+gda_top_src,
+               'GDA_TOP_BUILD_DIR='+gda_top_build
                ]
        )
 
@@ -33,9 +33,9 @@ dbtb = executable('check_db_base',
        'check-db-base.c',
        c_args: [
                '-include',
-               meson.build_root() + '/config.h',
+               join_paths(gda_top_build, 'config.h'),
                '-DCHECK_FILES="'+meson.source_root()+'"',
-               '-DTOP_BUILD_DIR="'+meson.build_root()+'"'
+               '-DTOP_BUILD_DIR="'+gda_top_build+'"'
                ],
        link_with: libgda,
        dependencies: [
@@ -48,8 +48,8 @@ dbtb = executable('check_db_base',
 test('dbbase', dbtb,
        timeout: 300,
        env: [
-               'GDA_TOP_SRC_DIR='+meson.source_root(),
-               'GDA_TOP_BUILD_DIR='+meson.build_root()
+               'GDA_TOP_SRC_DIR='+gda_top_src,
+               'GDA_TOP_BUILD_DIR='+gda_top_build
                ]
        )
 
@@ -59,9 +59,9 @@ dbtc = executable('check_db_column',
        'check-db-column.c',
        c_args: [
                '-include',
-               meson.build_root() + '/config.h',
+               join_paths(gda_top_build, 'config.h'),
                '-DCHECK_FILES="'+meson.source_root()+'"',
-               '-DTOP_BUILD_DIR="'+meson.build_root()+'"'
+               '-DTOP_BUILD_DIR="'+gda_top_build+'"'
                ],
        link_with: libgda,
        dependencies: [
@@ -74,8 +74,8 @@ dbtc = executable('check_db_column',
 test('dbcolumn', dbtc,
        timeout: 300,
        env: [
-               'GDA_TOP_SRC_DIR='+meson.source_root(),
-               'GDA_TOP_BUILD_DIR='+meson.build_root()
+               'GDA_TOP_SRC_DIR='+gda_top_src,
+               'GDA_TOP_BUILD_DIR='+gda_top_build
                ]
        )
 
@@ -83,9 +83,9 @@ dbtv = executable('check_db_view',
        'check-db-view.c',
        c_args: [
                '-include',
-               meson.build_root() + '/config.h',
+               join_paths(gda_top_build, 'config.h'),
                '-DCHECK_FILES="'+meson.source_root()+'"',
-               '-DTOP_BUILD_DIR="'+meson.build_root()+'"'
+               '-DTOP_BUILD_DIR="'+gda_top_build+'"'
                ],
        link_with: libgda,
        dependencies: [
@@ -98,17 +98,17 @@ dbtv = executable('check_db_view',
 test('dbview', dbtv,
        timeout: 300,
        env: [
-               'GDA_TOP_SRC_DIR='+meson.source_root(),
-               'GDA_TOP_BUILD_DIR='+meson.build_root()
+               'GDA_TOP_SRC_DIR='+gda_top_src,
+               'GDA_TOP_BUILD_DIR='+gda_top_build
                ]
        )
 dbfkey = executable('check_db_fkey',
        'check-db-fkey.c',
        c_args: [
                '-include',
-               meson.build_root() + '/config.h',
+               join_paths(gda_top_build, 'config.h'),
                '-DCHECK_FILES="'+meson.source_root()+'"',
-               '-DTOP_BUILD_DIR="'+meson.build_root()+'"'
+               '-DTOP_BUILD_DIR="'+gda_top_build+'"'
                ],
        link_with: libgda,
        dependencies: [
@@ -121,17 +121,17 @@ dbfkey = executable('check_db_fkey',
 test('dbfkey', dbfkey,
        timeout: 300,
        env: [
-               'GDA_TOP_SRC_DIR='+meson.source_root(),
-               'GDA_TOP_BUILD_DIR='+meson.build_root()
+               'GDA_TOP_SRC_DIR='+gda_top_src,
+               'GDA_TOP_BUILD_DIR='+gda_top_build
                ]
        )
 dbcreate = executable('check_db_create',
        'check-db-db-create.c',
        c_args: [
                '-include',
-               meson.build_root() + '/config.h',
+               join_paths(gda_top_build, 'config.h'),
                '-DCHECK_FILES="'+meson.source_root()+'"',
-               '-DTOP_BUILD_DIR="'+meson.build_root()+'"'
+               '-DTOP_BUILD_DIR="'+gda_top_build+'"'
                ],
        link_with: libgda,
        dependencies: [
@@ -144,8 +144,8 @@ dbcreate = executable('check_db_create',
 test('dbcreate', dbcreate,
        timeout: 300,
        env: [
-               'GDA_TOP_SRC_DIR='+meson.source_root(),
-               'GDA_TOP_BUILD_DIR='+meson.build_root()
+               'GDA_TOP_SRC_DIR='+gda_top_src,
+               'GDA_TOP_BUILD_DIR='+gda_top_build
                ]
        )
 
@@ -157,9 +157,9 @@ tcpg = executable('check-db-catalog-postgresql',
        db_catalog_pg_sources,
        c_args: [
                '-include',
-               meson.build_root() + '/config.h',
+               join_paths(gda_top_build, 'config.h'),
                '-DCHECK_FILES="'+meson.source_root()+'"',
-               '-DTOP_BUILD_DIR="'+meson.build_root()+'"'
+               '-DTOP_BUILD_DIR="'+gda_top_build+'"'
                ],
        link_with: libgda,
        dependencies: [
@@ -172,7 +172,7 @@ tcpg = executable('check-db-catalog-postgresql',
 test('dbcatalog-postgresql', tcpg,
        timeout: 300,
        env: [
-               'GDA_TOP_SRC_DIR='+meson.source_root(),
-               'GDA_TOP_BUILD_DIR='+meson.build_root()
+               'GDA_TOP_SRC_DIR='+gda_top_src,
+               'GDA_TOP_BUILD_DIR='+gda_top_build
                ]
        )
diff --git a/tests/meson.build b/tests/meson.build
index 2e4ca6375..3a2e0b099 100644
--- a/tests/meson.build
+++ b/tests/meson.build
@@ -1,8 +1,8 @@
 test_cargs = [
        '-include',
-       'config.h',
+       join_paths(gda_top_build, 'config.h'),
        '-DCHECK_FILES="'+meson.source_root()+'"',
-       '-DTOP_BUILD_DIR="'+meson.build_root()+'"'
+       '-DTOP_BUILD_DIR="'+gda_top_build+'"'
        ]
 test_cargs += general_cargs
 
@@ -42,8 +42,8 @@ trddlc = executable('test-ddl-creator test',
        )
 test('RawDdlCreator', trddlc,
        env: [
-               'GDA_TOP_SRC_DIR='+meson.source_root(),
-               'GDA_TOP_BUILD_DIR='+meson.build_root()
+               'GDA_TOP_SRC_DIR='+gda_top_src,
+               'GDA_TOP_BUILD_DIR='+gda_top_build
                ]
        )
 
@@ -60,8 +60,8 @@ tbc = executable('test-bin-converter',
        )
 test('BinConverter', tbc,
        env: [
-               'GDA_TOP_SRC_DIR='+meson.source_root(),
-               'GDA_TOP_BUILD_DIR='+meson.build_root()
+               'GDA_TOP_SRC_DIR='+gda_top_src,
+               'GDA_TOP_BUILD_DIR='+gda_top_build
                ]
        )
 
@@ -79,8 +79,8 @@ tsqli = executable('test-sql-identifier',
        )
 test('SqlIdentifier', tsqli,
        env: [
-               'GDA_TOP_SRC_DIR='+meson.source_root(),
-               'GDA_TOP_BUILD_DIR='+meson.build_root()
+               'GDA_TOP_SRC_DIR='+gda_top_src,
+               'GDA_TOP_BUILD_DIR='+gda_top_build
                ]
        )
 
@@ -97,8 +97,8 @@ tiq = executable('test-identifiers-quotes',
        )
 test('IdentifiersQuotes', tiq,
        env: [
-               'GDA_TOP_SRC_DIR='+meson.source_root(),
-               'GDA_TOP_BUILD_DIR='+meson.build_root()
+               'GDA_TOP_SRC_DIR='+gda_top_src,
+               'GDA_TOP_BUILD_DIR='+gda_top_build
                ]
        )
 
@@ -115,8 +115,8 @@ tsqlb = executable('test-sql-builder',
        )
 test('SqlBuilder', tsqlb,
        env: [
-               'GDA_TOP_SRC_DIR='+meson.source_root(),
-               'GDA_TOP_BUILD_DIR='+meson.build_root()
+               'GDA_TOP_SRC_DIR='+gda_top_src,
+               'GDA_TOP_BUILD_DIR='+gda_top_build
                ]
        )
 
@@ -133,8 +133,8 @@ tcstrs = executable('test-connection-string-split',
        )
 test('ConnectionStringSplit', tcstrs,
        env: [
-               'GDA_TOP_SRC_DIR='+meson.source_root(),
-               'GDA_TOP_BUILD_DIR='+meson.build_root()
+               'GDA_TOP_SRC_DIR='+gda_top_src,
+               'GDA_TOP_BUILD_DIR='+gda_top_build
                ]
        )
 
@@ -151,8 +151,8 @@ tipar = executable('test-input-parsers',
        )
 test('InputParsers', tipar,
        env: [
-               'GDA_TOP_SRC_DIR='+meson.source_root(),
-               'GDA_TOP_BUILD_DIR='+meson.build_root()
+               'GDA_TOP_SRC_DIR='+gda_top_src,
+               'GDA_TOP_BUILD_DIR='+gda_top_build
                ]
        )
 
@@ -169,8 +169,8 @@ tqkl = executable('test-quark-list',
        )
 test('QuarkList', tqkl,
        env: [
-               'GDA_TOP_SRC_DIR='+meson.source_root(),
-               'GDA_TOP_BUILD_DIR='+meson.build_root()
+               'GDA_TOP_SRC_DIR='+gda_top_src,
+               'GDA_TOP_BUILD_DIR='+gda_top_build
                ]
        )
 
@@ -187,8 +187,8 @@ tsqlr = executable('test-sql-renderer',
        )
 test('SqlRenderer', tsqlr,
        env: [
-               'GDA_TOP_SRC_DIR='+meson.source_root(),
-               'GDA_TOP_BUILD_DIR='+meson.build_root()
+               'GDA_TOP_SRC_DIR='+gda_top_src,
+               'GDA_TOP_BUILD_DIR='+gda_top_build
                ]
        )
 
@@ -205,8 +205,8 @@ tso = executable('test-server-operation',
        )
 test('ServerOperation', tso,
        env: [
-               'GDA_TOP_SRC_DIR='+meson.source_root(),
-               'GDA_TOP_BUILD_DIR='+meson.build_root()
+               'GDA_TOP_SRC_DIR='+gda_top_src,
+               'GDA_TOP_BUILD_DIR='+gda_top_build
                ]
        )
 
@@ -223,8 +223,8 @@ tmp = executable('test-provider-meta',
        )
 # test('ProviderMeta', tmp,
 #      env: [
-#              'GDA_TOP_SRC_DIR='+meson.source_root(),
-#              'GDA_TOP_BUILD_DIR='+meson.build_root()
+#              'GDA_TOP_SRC_DIR='+gda_top_src,
+#              'GDA_TOP_BUILD_DIR='+gda_top_build
 #              ]
 #      )
 
diff --git a/tests/meta-store/meson.build b/tests/meta-store/meson.build
index 1bdf2de7b..e5656075a 100644
--- a/tests/meta-store/meson.build
+++ b/tests/meta-store/meson.build
@@ -7,8 +7,8 @@ tchkmst = executable('check_meta_store_memory',
        ['check_meta_store_memory.c'] + meta_store_common_sources,
        c_args: [
                '-include',
-               meson.build_root() + '/config.h',
-               '-DTOP_SRC_DIR="'+meson.source_root()+'"',
+               join_paths(gda_top_build, 'config.h'),
+               '-DTOP_SRC_DIR="'+gda_top_src+'"',
                ],
        link_with: libgda,
        dependencies: [
@@ -21,8 +21,8 @@ tchkmst = executable('check_meta_store_memory',
        )
 test('MetaStoreMemory', tchkmst,
        env: [
-               'GDA_TOP_SRC_DIR='+meson.source_root(),
-               'GDA_TOP_BUILD_DIR='+meson.build_root()
+               'GDA_TOP_SRC_DIR='+gda_top_src,
+               'GDA_TOP_BUILD_DIR='+gda_top_build
                ]
        )
 
@@ -30,8 +30,8 @@ tchkmstsqlite = executable('check_meta_store_sqlite',
        ['check_meta_store_sqlite.c'] + meta_store_common_sources,
        c_args: [
                '-include',
-               meson.build_root() + '/config.h',
-               '-DTOP_SRC_DIR="'+meson.source_root()+'"',
+               join_paths(gda_top_build, 'config.h'),
+               '-DTOP_SRC_DIR="'+gda_top_src+'"',
                ],
        link_with: libgda,
        dependencies: [
@@ -45,8 +45,8 @@ tchkmstsqlite = executable('check_meta_store_sqlite',
 test('MetaStoreSqlite', tchkmstsqlite,
        timeout: 300,
        env: [
-               'GDA_TOP_SRC_DIR='+meson.source_root(),
-               'GDA_TOP_BUILD_DIR='+meson.build_root()
+               'GDA_TOP_SRC_DIR='+gda_top_src,
+               'GDA_TOP_BUILD_DIR='+gda_top_build
                ]
        )
 
@@ -54,8 +54,8 @@ tchkmstspg = executable('check_meta_store_postgresql',
        ['check_meta_store_postgresql.c'] + meta_store_common_sources,
        c_args: [
                '-include',
-               meson.build_root() + '/config.h',
-               '-DTOP_SRC_DIR="'+meson.source_root()+'"',
+               join_paths(gda_top_build, 'config.h'),
+               '-DTOP_SRC_DIR="'+gda_top_src+'"',
                ],
        link_with: libgda,
        dependencies: [
@@ -69,8 +69,8 @@ tchkmstspg = executable('check_meta_store_postgresql',
 test('MetaStorePostgres', tchkmstspg,
        timeout: 200,
        env: [
-               'GDA_TOP_SRC_DIR='+meson.source_root(),
-               'GDA_TOP_BUILD_DIR='+meson.build_root()
+               'GDA_TOP_SRC_DIR='+gda_top_src,
+               'GDA_TOP_BUILD_DIR='+gda_top_build
                ]
        )
 
@@ -78,8 +78,8 @@ tchkmstsmysql = executable('check_meta_store_mysql',
        ['check_meta_store_mysql.c'] + meta_store_common_sources,
        c_args: [
                '-include',
-               meson.build_root() + '/config.h',
-               '-DTOP_SRC_DIR="'+meson.source_root()+'"',
+               join_paths(gda_top_build, 'config.h'),
+               '-DTOP_SRC_DIR="'+gda_top_src+'"',
                ],
        link_with: libgda,
        dependencies: [
@@ -93,7 +93,7 @@ tchkmstsmysql = executable('check_meta_store_mysql',
 test('MetaStoreMySQL', tchkmstsmysql,
        timeout: 300,
        env: [
-               'GDA_TOP_SRC_DIR='+meson.source_root(),
-               'GDA_TOP_BUILD_DIR='+meson.build_root()
+               'GDA_TOP_SRC_DIR='+gda_top_src,
+               'GDA_TOP_BUILD_DIR='+gda_top_build
                ]
        )
diff --git a/tests/multi-threading/meson.build b/tests/multi-threading/meson.build
index dcd414037..dcf37ff69 100644
--- a/tests/multi-threading/meson.build
+++ b/tests/multi-threading/meson.build
@@ -9,8 +9,8 @@ tchkmthp = executable('check_parser',
        ['check_parser.c'] + methread_common_sources + common_sources,
        c_args: [
                '-include',
-               meson.build_root() + '/config.h',
-               '-DROOT_DIR="'+meson.source_root()+'"',
+               join_paths(gda_top_build, 'config.h'),
+               '-DROOT_DIR="'+gda_top_src+'"',
                ],
        link_with: libgda,
        dependencies: [
@@ -23,8 +23,8 @@ tchkmthp = executable('check_parser',
        )
 test('MultiThreadParser', tchkmthp,
        env: [
-               'GDA_TOP_SRC_DIR='+meson.source_root(),
-               'GDA_TOP_BUILD_DIR='+meson.build_root()
+               'GDA_TOP_SRC_DIR='+gda_top_src,
+               'GDA_TOP_BUILD_DIR='+gda_top_build
                ]
        )
 
@@ -32,8 +32,8 @@ tchkmthlk = executable('check_cnc_lock',
        ['check_cnc_lock.c'] + methread_common_sources + common_sources,
        c_args: [
                '-include',
-               meson.build_root() + '/config.h',
-               '-DROOT_DIR="'+meson.source_root()+'"',
+               join_paths(gda_top_build, 'config.h'),
+               '-DROOT_DIR="'+gda_top_src+'"',
                ],
        link_with: libgda,
        dependencies: [
@@ -47,7 +47,7 @@ tchkmthlk = executable('check_cnc_lock',
 test('MultiThreadConnectionLock', tchkmthlk,
        timeout: 300,
        env: [
-               'GDA_TOP_SRC_DIR='+meson.source_root(),
-               'GDA_TOP_BUILD_DIR='+meson.build_root()
+               'GDA_TOP_SRC_DIR='+gda_top_src,
+               'GDA_TOP_BUILD_DIR='+gda_top_build
                ]
        )
diff --git a/tests/parser/meson.build b/tests/parser/meson.build
index 6545899d2..5b4d069d6 100644
--- a/tests/parser/meson.build
+++ b/tests/parser/meson.build
@@ -3,8 +3,8 @@ tchkpr = executable('check_parser',
        ['check_parser.c'],
        c_args: [
                '-include',
-               meson.build_root() + '/config.h',
-               '-DROOT_DIR="'+meson.source_root()+'"',
+               join_paths(gda_top_build, 'config.h'),
+               '-DROOT_DIR="'+gda_top_src+'"',
                ],
        link_with: libgda,
        dependencies: [
@@ -17,8 +17,8 @@ tchkpr = executable('check_parser',
        )
 test('Parser', tchkpr,
        env: [
-               'GDA_TOP_SRC_DIR='+meson.source_root(),
-               'GDA_TOP_BUILD_DIR='+meson.build_root()
+               'GDA_TOP_SRC_DIR='+gda_top_src,
+               'GDA_TOP_BUILD_DIR='+gda_top_build
                ]
        )
 
@@ -26,8 +26,8 @@ tchkval = executable('check_validation',
        ['check_validation.c'],
        c_args: [
                '-include',
-               meson.build_root() + '/config.h',
-               '-DROOT_DIR="'+meson.source_root()+'"',
+               join_paths(gda_top_build, 'config.h'),
+               '-DROOT_DIR="'+gda_top_src+'"',
                ],
        link_with: libgda,
        dependencies: [
@@ -40,8 +40,8 @@ tchkval = executable('check_validation',
        )
 test('Validation', tchkval,
        env: [
-               'GDA_TOP_SRC_DIR='+meson.source_root(),
-               'GDA_TOP_BUILD_DIR='+meson.build_root()
+               'GDA_TOP_SRC_DIR='+gda_top_src,
+               'GDA_TOP_BUILD_DIR='+gda_top_build
                ]
        )
 
@@ -49,8 +49,8 @@ tchkval = executable('check_normalization',
        ['check_normalization.c'],
        c_args: [
                '-include',
-               meson.build_root() + '/config.h',
-               '-DROOT_DIR="'+meson.source_root()+'"',
+               join_paths(gda_top_build, 'config.h'),
+               '-DROOT_DIR="'+gda_top_src+'"',
                ],
        link_with: libgda,
        dependencies: [
@@ -63,8 +63,8 @@ tchkval = executable('check_normalization',
        )
 test('Normalization', tchkval,
        env: [
-               'GDA_TOP_SRC_DIR='+meson.source_root(),
-               'GDA_TOP_BUILD_DIR='+meson.build_root()
+               'GDA_TOP_SRC_DIR='+gda_top_src,
+               'GDA_TOP_BUILD_DIR='+gda_top_build
                ]
        )
 
@@ -72,8 +72,8 @@ tchkdlmc = executable('check_dml_comp',
        ['check_dml_comp.c'],
        c_args: [
                '-include',
-               meson.build_root() + '/config.h',
-               '-DROOT_DIR="'+meson.source_root()+'"',
+               join_paths(gda_top_build, 'config.h'),
+               '-DROOT_DIR="'+gda_top_src+'"',
                ],
        link_with: libgda,
        dependencies: [
@@ -86,8 +86,8 @@ tchkdlmc = executable('check_dml_comp',
        )
 test('DlmComp', tchkdlmc,
        env: [
-               'GDA_TOP_SRC_DIR='+meson.source_root(),
-               'GDA_TOP_BUILD_DIR='+meson.build_root()
+               'GDA_TOP_SRC_DIR='+gda_top_src,
+               'GDA_TOP_BUILD_DIR='+gda_top_build
                ]
        )
 
@@ -95,8 +95,8 @@ tchkscript = executable('check_script',
        ['check_script.c'],
        c_args: [
                '-include',
-               meson.build_root() + '/config.h',
-               '-DROOT_DIR="'+meson.source_root()+'"',
+               join_paths(gda_top_build, 'config.h'),
+               '-DROOT_DIR="'+gda_top_src+'"',
                ],
        link_with: libgda,
        dependencies: [
@@ -109,8 +109,8 @@ tchkscript = executable('check_script',
        )
 test('Script', tchkscript,
        env: [
-               'GDA_TOP_SRC_DIR='+meson.source_root(),
-               'GDA_TOP_BUILD_DIR='+meson.build_root()
+               'GDA_TOP_SRC_DIR='+gda_top_src,
+               'GDA_TOP_BUILD_DIR='+gda_top_build
                ]
        )
 
@@ -118,8 +118,8 @@ tchkrwd = executable('check_rewrite_for_default',
        ['check_rewrite_for_default.c'],
        c_args: [
                '-include',
-               meson.build_root() + '/config.h',
-               '-DROOT_DIR="'+meson.source_root()+'"',
+               join_paths(gda_top_build, 'config.h'),
+               '-DROOT_DIR="'+gda_top_src+'"',
                ],
        link_with: libgda,
        dependencies: [
@@ -132,8 +132,8 @@ tchkrwd = executable('check_rewrite_for_default',
        )
 test('RewriteDefault', tchkrwd,
        env: [
-               'GDA_TOP_SRC_DIR='+meson.source_root(),
-               'GDA_TOP_BUILD_DIR='+meson.build_root()
+               'GDA_TOP_SRC_DIR='+gda_top_src,
+               'GDA_TOP_BUILD_DIR='+gda_top_build
                ]
        )
 
diff --git a/tests/providers/meson.build b/tests/providers/meson.build
index 0220ec2e1..312409eab 100644
--- a/tests/providers/meson.build
+++ b/tests/providers/meson.build
@@ -9,8 +9,8 @@ tchksqlite = executable('check_sqlite',
        ['check_sqlite.c']+providers_common_sources+common_sources+tests_sources,
        c_args: [
                '-include',
-               meson.build_root() + '/config.h',
-               '-DCHECK_SQL_FILES="'+meson.source_root()+'"',
+               join_paths(gda_top_build, 'config.h'),
+               '-DCHECK_SQL_FILES="'+gda_top_src+'"',
                ],
        link_with: libgda,
        dependencies: [
@@ -24,8 +24,8 @@ tchksqlite = executable('check_sqlite',
 test('ProviderSQLite', tchksqlite,
        timeout: 300,
        env: [
-               'GDA_TOP_SRC_DIR='+meson.source_root(),
-               'GDA_TOP_BUILD_DIR='+meson.build_root()
+               'GDA_TOP_SRC_DIR='+gda_top_src,
+               'GDA_TOP_BUILD_DIR='+gda_top_build
                ]
        )
 
@@ -35,8 +35,8 @@ tchksqlcipher = executable('check_sqlcipher',
        ['check_sqlcipher.c']+providers_common_sources+common_sources+tests_sources,
        c_args: [
                '-include',
-               meson.build_root() + '/config.h',
-               '-DCHECK_SQL_FILES="'+meson.source_root()+'"',
+               join_paths(gda_top_build, 'config.h'),
+               '-DCHECK_SQL_FILES="'+gda_top_src+'"',
                ],
        link_with: libgda,
        dependencies: [
@@ -49,8 +49,8 @@ tchksqlcipher = executable('check_sqlcipher',
        )
 test('ProviderSQLCipher', tchksqlcipher,
        env: [
-               'GDA_TOP_SRC_DIR='+meson.source_root(),
-               'GDA_TOP_BUILD_DIR='+meson.build_root()
+               'GDA_TOP_SRC_DIR='+gda_top_src,
+               'GDA_TOP_BUILD_DIR='+gda_top_build
                ]
        )
 endif
@@ -61,8 +61,8 @@ tchkpg = executable('check_postgres',
        ['check_postgres.c']+providers_common_sources+common_sources+tests_sources,
        c_args: [
                '-include',
-               meson.build_root() + '/config.h',
-               '-DCHECK_SQL_FILES="'+meson.source_root()+'"',
+               join_paths(gda_top_build, 'config.h'),
+               '-DCHECK_SQL_FILES="'+gda_top_src+'"',
                ],
        link_with: libgda,
        dependencies: [
@@ -77,8 +77,8 @@ test('ProviderPostgreSQL', tchkpg,
        timeout: 300,
        is_parallel: false,
        env: [
-               'GDA_TOP_SRC_DIR='+meson.source_root(),
-               'GDA_TOP_BUILD_DIR='+meson.build_root()
+               'GDA_TOP_SRC_DIR='+gda_top_src,
+               'GDA_TOP_BUILD_DIR='+gda_top_build
                ]
        )
 
@@ -86,8 +86,8 @@ tchkpg = executable('check_postgresql_ddl',
        ['check_postgresql_ddl.c']+providers_common_sources+common_sources+tests_sources,
        c_args: [
                '-include',
-               meson.build_root() + '/config.h',
-               '-DCHECK_SQL_FILES="'+meson.source_root()+'"',
+               join_paths(gda_top_build, 'config.h'),
+               '-DCHECK_SQL_FILES="'+gda_top_src+'"',
                ],
        link_with: libgda,
        dependencies: [
@@ -102,8 +102,8 @@ test('ProviderPostgreSQLDDL', tchkpg,
        timeout: 300,
        is_parallel: false,
        env: [
-               'GDA_TOP_SRC_DIR='+meson.source_root(),
-               'GDA_TOP_BUILD_DIR='+meson.build_root()
+               'GDA_TOP_SRC_DIR='+gda_top_src,
+               'GDA_TOP_BUILD_DIR='+gda_top_build
                ]
        )
 
@@ -111,8 +111,8 @@ tchkpg_mu1 = executable('check_postgres_meta_partial_1',
        ['check_postgres_meta_partial-1.c']+providers_common_sources+common_sources+tests_sources,
        c_args: [
                '-include',
-               meson.build_root() + '/config.h',
-               '-DCHECK_SQL_FILES="'+meson.source_root()+'"',
+               join_paths(gda_top_build, 'config.h'),
+               '-DCHECK_SQL_FILES="'+gda_top_src+'"',
                ],
        link_with: libgda,
        dependencies: [
@@ -127,8 +127,8 @@ test('ProviderMetaPartialUpdate1PostgreSQL', tchkpg_mu1,
        timeout: 300,
        is_parallel: false,
        env: [
-               'GDA_TOP_SRC_DIR='+meson.source_root(),
-               'GDA_TOP_BUILD_DIR='+meson.build_root()
+               'GDA_TOP_SRC_DIR='+gda_top_src,
+               'GDA_TOP_BUILD_DIR='+gda_top_build
                ]
        )
 
@@ -136,8 +136,8 @@ tchkpg_mu2 = executable('check_postgres_meta_partial_2',
        ['check_postgres_meta_partial-2.c']+providers_common_sources+common_sources+tests_sources,
        c_args: [
                '-include',
-               meson.build_root() + '/config.h',
-               '-DCHECK_SQL_FILES="'+meson.source_root()+'"',
+               join_paths(gda_top_build, 'config.h'),
+               '-DCHECK_SQL_FILES="'+gda_top_src+'"',
                ],
        link_with: libgda,
        dependencies: [
@@ -152,8 +152,8 @@ test('ProviderMetaPartialUpdate2PostgreSQL', tchkpg_mu2,
        timeout: 600,
        is_parallel: false,
        env: [
-               'GDA_TOP_SRC_DIR='+meson.source_root(),
-               'GDA_TOP_BUILD_DIR='+meson.build_root()
+               'GDA_TOP_SRC_DIR='+gda_top_src,
+               'GDA_TOP_BUILD_DIR='+gda_top_build
                ]
        )
 
@@ -164,8 +164,8 @@ tchkmysql = executable('check_mysql',
        ['check_mysql.c']+providers_common_sources+common_sources+tests_sources,
        c_args: [
                '-include',
-               meson.build_root() + '/config.h',
-               '-DCHECK_SQL_FILES="'+meson.source_root()+'"',
+               join_paths(gda_top_build, 'config.h'),
+               '-DCHECK_SQL_FILES="'+gda_top_src+'"',
                ],
        link_with: libgda,
        dependencies: [
@@ -179,8 +179,8 @@ tchkmysql = executable('check_mysql',
 test('ProviderMySQL', tchkmysql,
        timeout: 300,
        env: [
-               'GDA_TOP_SRC_DIR='+meson.source_root(),
-               'GDA_TOP_BUILD_DIR='+meson.build_root()
+               'GDA_TOP_SRC_DIR='+gda_top_src,
+               'GDA_TOP_BUILD_DIR='+gda_top_build
                ]
        )
-endif
\ No newline at end of file
+endif
diff --git a/tests/ui/meson.build b/tests/ui/meson.build
index 785ceb295..b57325f5a 100644
--- a/tests/ui/meson.build
+++ b/tests/ui/meson.build
@@ -7,9 +7,9 @@ tckuis = executable('check_sets',
        ['check_sets.c'] + test_ui_common,
        c_args: [
                '-include',
-               meson.build_root() + '/config.h',
-               '-DROOT_DIR="'+meson.source_root()+'"',
-               '-DTOP_BUILD_DIR="'+meson.build_root()+'"'
+               join_paths(gda_top_build, 'config.h'),
+               '-DROOT_DIR="'+gda_top_src+'"',
+               '-DTOP_BUILD_DIR="'+gda_top_build+'"'
                ],
        link_with: [libgda, libgdaui],
        dependencies: [
@@ -31,9 +31,9 @@ tckuirgm = executable('check_raw_grid_model',
        ['check_raw_grid_model.c'] + test_ui_common,
        c_args: [
                '-include',
-               meson.build_root() + '/config.h',
-               '-DROOT_DIR="'+meson.source_root()+'"',
-               '-DTOP_BUILD_DIR="'+meson.build_root()+'"'
+               join_paths(gda_top_build, 'config.h'),
+               '-DROOT_DIR="'+gda_top_src+'"',
+               '-DTOP_BUILD_DIR="'+gda_top_build+'"'
                ],
        link_with: [libgda, libgdaui],
        dependencies: [
@@ -49,4 +49,4 @@ test('UIRawGridModel', tckuirgm,
                'GDA_TOP_SRC_DIR='+meson.source_root(),
                'GDA_TOP_BUILD_DIR='+meson.build_root(),
                ]
-       )
\ No newline at end of file
+       )
diff --git a/tests/value-holders/meson.build b/tests/value-holders/meson.build
index 64c7ec75e..6c709fcc2 100644
--- a/tests/value-holders/meson.build
+++ b/tests/value-holders/meson.build
@@ -8,8 +8,8 @@ tchkhdl = executable('check_holder',
        ['check_holder.c']+value_holders_common_sources+common_sources,
        c_args: [
                '-include',
-               meson.build_root() + '/config.h',
-               '-DROOT_DIR="'+meson.source_root()+'"',
+               join_paths(gda_top_build, 'config.h'),
+               '-DROOT_DIR="'+gda_top_src+'"',
                ],
        link_with: libgda,
        dependencies: [
@@ -22,8 +22,8 @@ tchkhdl = executable('check_holder',
        )
 test('ValueHolder', tchkhdl,
        env: [
-               'GDA_TOP_SRC_DIR='+meson.source_root(),
-               'GDA_TOP_BUILD_DIR='+meson.build_root()
+               'GDA_TOP_SRC_DIR='+gda_top_src,
+               'GDA_TOP_BUILD_DIR='+gda_top_build
                ]
        )
 
@@ -31,8 +31,8 @@ tchkset = executable('check_set',
        ['check_set.c']+value_holders_common_sources+common_sources,
        c_args: [
                '-include',
-               meson.build_root() + '/config.h',
-               '-DROOT_DIR="'+meson.source_root()+'"',
+               join_paths(gda_top_build, 'config.h'),
+               '-DROOT_DIR="'+gda_top_src+'"',
                ],
        link_with: libgda,
        dependencies: [
@@ -45,8 +45,8 @@ tchkset = executable('check_set',
        )
 test('ValueHolderSet', tchkset,
        env: [
-               'GDA_TOP_SRC_DIR='+meson.source_root(),
-               'GDA_TOP_BUILD_DIR='+meson.build_root()
+               'GDA_TOP_SRC_DIR='+gda_top_src,
+               'GDA_TOP_BUILD_DIR='+gda_top_build
                ]
        )
 
@@ -54,8 +54,8 @@ tchkstm = executable('check_statement',
        ['check_statement.c']+value_holders_common_sources+common_sources,
        c_args: [
                '-include',
-               meson.build_root() + '/config.h',
-               '-DROOT_DIR="'+meson.source_root()+'"',
+               join_paths(gda_top_build, 'config.h'),
+               '-DROOT_DIR="'+gda_top_src+'"',
                ],
        link_with: libgda,
        dependencies: [
@@ -68,7 +68,7 @@ tchkstm = executable('check_statement',
        )
 test('ValueHolderStatement', tchkstm,
        env: [
-               'GDA_TOP_SRC_DIR='+meson.source_root(),
-               'GDA_TOP_BUILD_DIR='+meson.build_root()
+               'GDA_TOP_SRC_DIR='+gda_top_src,
+               'GDA_TOP_BUILD_DIR='+gda_top_build
                ]
        )


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