Fix pkgconfig built by MSVC on Windows (#992)

Co-authored-by: jheaff1 <jheaff1@outlook.com>
This commit is contained in:
James Sharpe 2023-02-21 11:43:07 +00:00 committed by GitHub
parent 228f9eb96a
commit 4d4a678974
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 4 additions and 1 deletions

View File

@ -192,7 +192,10 @@ def increment_pkg_config_path(_source):
local children=$($REAL_FIND "$1" -mindepth 1 -name '*.pc')
# assume there is only one directory with pkg config
for child in $children; do
export PKG_CONFIG_PATH="$${PKG_CONFIG_PATH:-}$$:$(dirname $child)"
LIB_DIR=$(dirname $child)
# pkg-config requires unix paths, e.g of the form /c/Users/..., rather than C:/Users/...
LIB_DIR=$(cygpath $${LIB_DIR//\\\\//}$$)
export PKG_CONFIG_PATH="$${PKG_CONFIG_PATH:-}$$:$${LIB_DIR}$$"
return
done
"""