Skip to content

Commit

Permalink
Fix pkgconfig built by MSVC on Windows
Browse files Browse the repository at this point in the history
  • Loading branch information
jheaff1 authored and jsharpe committed Jan 3, 2023
1 parent baeee71 commit ca0e032
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 ca0e032

Please sign in to comment.