meson: Handle windows path separator correctly

Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-rs/-/merge_requests/1021>
This commit is contained in:
Nirbheek Chauhan 2022-12-19 16:31:10 +05:30
parent 0530b324c1
commit 639997d67f
2 changed files with 8 additions and 3 deletions

View file

@ -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']

View file

@ -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',