mirror of
https://github.com/vlang/v.git
synced 2025-09-13 17:36:52 -04:00
v.pkgconfig: fix load_paths with ;
split char on windows (#21291)
This commit is contained in:
parent
ece10ede94
commit
d83d5a9580
@ -242,9 +242,10 @@ fn (mut pc PkgConfig) load_paths() {
|
||||
// Allow for full custom user control over the default paths too, through
|
||||
// setting `PKG_CONFIG_PATH_DEFAULTS` to a list of search paths, separated
|
||||
// by `:`.
|
||||
split_c := $if windows { ';' } $else { ':' }
|
||||
config_path_override := os.getenv('PKG_CONFIG_PATH_DEFAULTS')
|
||||
if config_path_override != '' {
|
||||
for path in config_path_override.split(':') {
|
||||
for path in config_path_override.split(split_c) {
|
||||
pc.add_path(path)
|
||||
}
|
||||
} else {
|
||||
@ -254,12 +255,12 @@ fn (mut pc PkgConfig) load_paths() {
|
||||
}
|
||||
}
|
||||
}
|
||||
for path in pc.options.path.split(':') {
|
||||
for path in pc.options.path.split(split_c) {
|
||||
pc.add_path(path)
|
||||
}
|
||||
env_var := os.getenv('PKG_CONFIG_PATH')
|
||||
if env_var != '' {
|
||||
env_paths := env_var.trim_space().split(':')
|
||||
env_paths := env_var.trim_space().split(split_c)
|
||||
for path in env_paths {
|
||||
pc.add_path(path)
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user