Skip to content

Commit

Permalink
fix to setting PKG_CONFIG_PATH
Browse files Browse the repository at this point in the history
  • Loading branch information
smdn committed May 26, 2024
1 parent 2aa3a02 commit 2bbac55
Showing 1 changed file with 6 additions and 4 deletions.
10 changes: 6 additions & 4 deletions src/highlight/configure.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -42,10 +42,12 @@ function Build-ConfigMk {
# For pkg-config to find lua@5.3 you may need to set:
# export PKG_CONFIG_PATH="/opt/homebrew/opt/lua@5.3/lib/pkgconfig"

$Env:PKG_CONFIG_PATH =
"/opt/homebrew/opt/lua@5.3/lib/pkgconfig;" +
"/usr/local/opt/lua@5.3/lib/pkgconfig;" +
$Env:PKG_CONFIG_PATH
foreach ($pkg_config_path in ("/opt/homebrew/opt/lua@5.3/lib/pkgconfig", "/usr/local/opt/lua@5.3/lib/pkgconfig")) {
if (Test-Path -Path $pkg_config_path) {
$Env:PKG_CONFIG_PATH = $pkg_config_path
break
}
}
}

Get-Command -ErrorAction:SilentlyContinue pkg-config | Out-Null
Expand Down

0 comments on commit 2bbac55

Please sign in to comment.