diff --git a/meson.build b/meson.build index f6a5c59040..bbcbba6e69 100644 --- a/meson.build +++ b/meson.build @@ -296,7 +296,8 @@ config_h.set10('WITH_JANSSON', jansson_dep.found()) jansson_msg = 'no' if jansson_dep.found() jansson_libdir = jansson_dep.get_variable(pkgconfig: 'libdir') - res = run_command(find_program('eu-readelf', 'readelf'), '-d', join_paths(jansson_libdir, 'libjansson.so'), check: false) + jansson_sysroot = meson.is_cross_build() ? meson.get_external_property('sys_root', '') : '' + res = run_command(find_program('eu-readelf', 'readelf'), '-d', jansson_sysroot + join_paths(jansson_libdir, 'libjansson.so'), check: false) jansson_soname = '' foreach line: res.stdout().split('\n') if line.strip().contains('SONAME') diff --git a/src/libnm-client-impl/meson.build b/src/libnm-client-impl/meson.build index 3352ebfee0..329078ab46 100644 --- a/src/libnm-client-impl/meson.build +++ b/src/libnm-client-impl/meson.build @@ -167,13 +167,13 @@ if enable_introspection install: true, ) - gi_typelib_path = run_command('printenv', 'GI_TYPELIB_PATH', check: false).stdout() + gi_typelib_path = run_command('printenv', 'GI_TYPELIB_PATH', check: false).stdout().strip() if gi_typelib_path != '' gi_typelib_path = ':' + gi_typelib_path endif gi_typelib_path = meson.current_build_dir() + gi_typelib_path - ld_library_path = run_command('printenv', 'LD_LIBRARY_PATH', check: false).stdout() + ld_library_path = run_command('printenv', 'LD_LIBRARY_PATH', check: false).stdout().strip() if ld_library_path != '' ld_library_path = ':' + ld_library_path endif