From 639997d67f02dbbb8adc1e2d4958c87d988b9a97 Mon Sep 17 00:00:00 2001 From: Nirbheek Chauhan Date: Mon, 19 Dec 2022 16:31:10 +0530 Subject: [PATCH] meson: Handle windows path separator correctly Part-of: --- cargo_wrapper.py | 4 ++-- meson.build | 7 ++++++- 2 files changed, 8 insertions(+), 3 deletions(-) diff --git a/cargo_wrapper.py b/cargo_wrapper.py index 6a6f3e4d..15244712 100644 --- a/cargo_wrapper.py +++ b/cargo_wrapper.py @@ -74,9 +74,9 @@ if __name__ == "__main__": env = os.environ.copy() env['CARGO_TARGET_DIR'] = str(cargo_target_dir) - pkg_config_path = env.get('PKG_CONFIG_PATH', '').split(':') + pkg_config_path = env.get('PKG_CONFIG_PATH', '').split(os.pathsep) pkg_config_path.append(str(opts.root_dir / 'meson-uninstalled')) - env['PKG_CONFIG_PATH'] = ':'.join(pkg_config_path) + env['PKG_CONFIG_PATH'] = os.pathsep.join(pkg_config_path) if opts.command == 'build': cargo_cmd = ['cargo'] diff --git a/meson.build b/meson.build index 8dd390c6..919a8cad 100644 --- a/meson.build +++ b/meson.build @@ -6,6 +6,7 @@ project('gst-plugins-rs', python = import('python').find_installation() fs = import('fs') +host_system = host_machine.system() if get_option('debug') target = 'debug' @@ -219,7 +220,11 @@ endif pkg_config_path = get_option('pkg_config_path') if pkg_config_path.length() > 0 - extra_env += {'PKG_CONFIG_PATH': ':'.join(pkg_config_path)} + pathsep = ':' + if host_system == 'windows' + pathsep = ';' + endif + extra_env += {'PKG_CONFIG_PATH': pathsep.join(pkg_config_path)} endif rs_plugins = custom_target('gst-plugins-rs',