diff options
| author | ruki <[email protected]> | 2021-04-10 20:42:52 +0800 |
|---|---|---|
| committer | ruki <[email protected]> | 2021-04-10 20:42:52 +0800 |
| commit | e5c1550e47018a1e6545197d2e5364c15ed56678 (patch) | |
| tree | 3678c414365940e4fb2dad1d9158e6d77c83dcd2 | |
| parent | f234b92504e3763b7bea4cd2537db02c198de26c (diff) | |
fix find_package
| -rw-r--r-- | xmake/modules/lib/detect/pkgconfig.lua | 4 | ||||
| -rw-r--r-- | xmake/modules/package/manager/brew/find_package.lua | 2 |
2 files changed, 3 insertions, 3 deletions
diff --git a/xmake/modules/lib/detect/pkgconfig.lua b/xmake/modules/lib/detect/pkgconfig.lua index f7d17fe33..9cd07a1e7 100644 --- a/xmake/modules/lib/detect/pkgconfig.lua +++ b/xmake/modules/lib/detect/pkgconfig.lua @@ -34,7 +34,7 @@ import("detect.tools.find_pkg_config") function version(name, opt) -- attempt to add search paths from pkg-config - local pkgconfig = find_pkgconfig() + local pkgconfig = find_pkg_config() if not pkgconfig then return end @@ -73,7 +73,7 @@ end function variables(name, variables, opt) -- attempt to add search paths from pkg-config - local pkgconfig = find_pkgconfig() + local pkgconfig = find_pkg_config() if not pkgconfig then return end diff --git a/xmake/modules/package/manager/brew/find_package.lua b/xmake/modules/package/manager/brew/find_package.lua index f3677282a..49db5a464 100644 --- a/xmake/modules/package/manager/brew/find_package.lua +++ b/xmake/modules/package/manager/brew/find_package.lua @@ -80,7 +80,7 @@ function main(name, opt) if pcfile then opt.configdirs = path.directory(pcfile) result = find_package("pkgconfig::" .. pcname, opt) - if not result then + if not result or not result.includedirs then -- attempt to get includedir variable from pkg-config/xx.pc local varinfo = pkgconfig.variables(pcname, "includedir", opt) if varinfo and varinfo.includedir then |
