diff options
| author | ruki <[email protected]> | 2018-12-05 00:45:35 +0800 |
|---|---|---|
| committer | ruki <[email protected]> | 2018-12-04 23:29:11 +0800 |
| commit | be6390741372ee7d02f6023fa7ee2512cb9b9840 (patch) | |
| tree | 1d406acc9d0805382e0082fd42aac0e4cd045da1 /xmake/modules/lib/detect/pkg_config.lua | |
| parent | 6aee7d32d56860554ab336ff575e86ba98b09ef9 (diff) | |
fix pkg-config
Diffstat (limited to 'xmake/modules/lib/detect/pkg_config.lua')
| -rw-r--r-- | xmake/modules/lib/detect/pkg_config.lua | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/xmake/modules/lib/detect/pkg_config.lua b/xmake/modules/lib/detect/pkg_config.lua index 7766b0dcd..4c69ff93f 100644 --- a/xmake/modules/lib/detect/pkg_config.lua +++ b/xmake/modules/lib/detect/pkg_config.lua @@ -69,8 +69,8 @@ function info(name, opt) os.addenv("PKG_CONFIG_PATH", unpack(configdirs)) end - -- only find debug package? clear the other pkg-config pathes - if opt.mode == "debug" then + -- find other mode package? clear the other pkg-config pathes + if opt.mode and opt.mode ~= "release" then os.setenv("PKG_CONFIG_PATH", nil) end @@ -84,7 +84,7 @@ function info(name, opt) os.addenv("PKG_CONFIG_PATH", path.join(global.directory(), "prefix", platsubdirs, opt.mode or "release", "lib", "pkgconfig")) -- find the prefix directory of brew directly, because `brew --prefix name` is too slow! - if opt.mode ~= "debug" then + if not opt.mode or opt.mode == "release" then local pcfile = find_file(name .. ".pc", "/usr/local/Cellar/" .. (opt.brewhint or name) .. "/*/lib/pkgconfig") if pcfile then brewprefix = path.directory(path.directory(path.directory(pcfile))) |
