summaryrefslogtreecommitdiff
path: root/xmake/modules/lib/detect/pkg_config.lua
diff options
context:
space:
mode:
authorruki <[email protected]>2018-10-10 22:52:59 +0800
committerruki <[email protected]>2018-10-10 11:18:00 +0800
commit54425048a21fa961ad528e64d7f9aba7d49b8f9a (patch)
tree43ef434df64366019b8d833c697ccc7ac622df79 /xmake/modules/lib/detect/pkg_config.lua
parent6939afdafdbb00c0a616e58632b292f776ad2dfa (diff)
improve pkg-config find order
Diffstat (limited to 'xmake/modules/lib/detect/pkg_config.lua')
-rw-r--r--xmake/modules/lib/detect/pkg_config.lua5
1 files changed, 1 insertions, 4 deletions
diff --git a/xmake/modules/lib/detect/pkg_config.lua b/xmake/modules/lib/detect/pkg_config.lua
index 13d332eb5..2eb675ed7 100644
--- a/xmake/modules/lib/detect/pkg_config.lua
+++ b/xmake/modules/lib/detect/pkg_config.lua
@@ -69,9 +69,6 @@ function info(name, opt)
os.addenv("PKG_CONFIG_PATH", unpack(configdirs))
end
- -- attempt to find package without `brew --prefix` first
- local flags = try { function () return os.iorunv(pkg_config, {"--libs", "--cflags", name}) end }
-
-- attempt to get pkg-config path from `brew --prefix` if no flags
local brewprefix = nil
if not flags then
@@ -92,7 +89,7 @@ function info(name, opt)
end
-- get libs and cflags
- flags = flags or try { function () return os.iorunv(pkg_config, {"--libs", "--cflags", name}) end }
+ local flags = try { function () return os.iorunv(pkg_config, {"--libs", "--cflags", name}) end }
if flags then
-- init result