v.pkgconfig: handle paths to local .pc files too (needed for homebrew) (#8290)
parent
ba2a15c9d7
commit
749d6133a1
|
@ -136,13 +136,19 @@ fn (mut pc PkgConfig) parse(file string) bool {
|
||||||
}
|
}
|
||||||
|
|
||||||
fn (mut pc PkgConfig) resolve(pkgname string) ?string {
|
fn (mut pc PkgConfig) resolve(pkgname string) ?string {
|
||||||
if pc.paths.len == 0 {
|
if pkgname.ends_with('.pc') {
|
||||||
pc.paths << '.'
|
if os.exists(pkgname) {
|
||||||
}
|
return pkgname
|
||||||
for path in pc.paths {
|
}
|
||||||
file := '$path/${pkgname}.pc'
|
} else {
|
||||||
if os.exists(file) {
|
if pc.paths.len == 0 {
|
||||||
return file
|
pc.paths << '.'
|
||||||
|
}
|
||||||
|
for path in pc.paths {
|
||||||
|
file := '$path/${pkgname}.pc'
|
||||||
|
if os.exists(file) {
|
||||||
|
return file
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
return error('Cannot find "$pkgname" pkgconfig file')
|
return error('Cannot find "$pkgname" pkgconfig file')
|
||||||
|
|
Loading…
Reference in New Issue