diff options
| author | ruki <[email protected]> | 2020-10-14 23:22:04 +0800 |
|---|---|---|
| committer | ruki <[email protected]> | 2020-10-14 23:22:04 +0800 |
| commit | 7ed6f98c2ebfead99b45fb7f4af369b3b47b2618 (patch) | |
| tree | 17a610b3f1116fc684fe818583ddbc6eddbe55f9 | |
| parent | 55ba672eba29bd9a9e8fe808f0765810f13e73af (diff) | |
improve find_package
| -rw-r--r-- | xmake/modules/package/manager/xmake/find_package.lua | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/xmake/modules/package/manager/xmake/find_package.lua b/xmake/modules/package/manager/xmake/find_package.lua index fce6429f7..9ef351a87 100644 --- a/xmake/modules/package/manager/xmake/find_package.lua +++ b/xmake/modules/package/manager/xmake/find_package.lua @@ -62,10 +62,12 @@ function _find_package_from_repo(name, opt) for _, includedir in ipairs(vars.includedirs) do table.insert(includedirs, path.join(installdir, includedir)) end - if #includedirs == 0 then + if #includedirs == 0 and os.isdir(path.join(installdir, "include")) then table.insert(includedirs, path.join(installdir, "include")) end - result.includedirs = table.unique(includedirs) + if #includedirs > 0 then + result.includedirs = table.unique(includedirs) + end -- get links and link directories local links = {} |
