Skip to content

Commit

Permalink
Fix pkgconfig built by MSVC on Windows (#992)
Browse files Browse the repository at this point in the history
Co-authored-by: jheaff1 <[email protected]>
  • Loading branch information
jsharpe and jheaff1 authored Feb 21, 2023
1 parent 228f9eb commit 4d4a678
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion foreign_cc/private/framework/toolchains/windows_commands.bzl
Original file line number Diff line number Diff line change
Expand Up @@ -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
"""
Expand Down

0 comments on commit 4d4a678

Please sign in to comment.