diff options
| author | ruki <[email protected]> | 2018-10-04 21:07:25 +0800 |
|---|---|---|
| committer | ruki <[email protected]> | 2018-10-04 00:44:33 +0800 |
| commit | 133a83d92d4ea4de51c360ab97b483aa0b8ccf59 (patch) | |
| tree | f125b46c78e1507806cff140560f6d656e520bb6 | |
| parent | 22a62caad1297fcb6f2239aa2429c7f38ca620f1 (diff) | |
fix find package
| -rw-r--r-- | xmake/core/sandbox/modules/import/lib/detect/find_package.lua | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/xmake/core/sandbox/modules/import/lib/detect/find_package.lua b/xmake/core/sandbox/modules/import/lib/detect/find_package.lua index 507ed5847..c770ace3e 100644 --- a/xmake/core/sandbox/modules/import/lib/detect/find_package.lua +++ b/xmake/core/sandbox/modules/import/lib/detect/find_package.lua @@ -248,9 +248,11 @@ function sandbox_lib_detect_find_package._find_from_prefixdirs(name, opt) result.includedirs = table.unique(includedirs) -- inherit the other prefix variables - for name, values in pairs(prefixinfo) do - if name ~= "links" and name ~= "linkdirs" and name ~= "includedirs" and name ~= "installed" and name ~= "prefixdir" then - result[name] = values + if prefixinfo then + for name, values in pairs(prefixinfo) do + if name ~= "links" and name ~= "linkdirs" and name ~= "includedirs" and name ~= "installed" and name ~= "prefixdir" then + result[name] = values + end end end end |
