summaryrefslogtreecommitdiff
path: root/xmake/modules
diff options
context:
space:
mode:
Diffstat (limited to 'xmake/modules')
-rw-r--r--xmake/modules/lib/detect/find_package.lua5
-rw-r--r--xmake/modules/package/manager/xmake/find_package.lua4
2 files changed, 7 insertions, 2 deletions
diff --git a/xmake/modules/lib/detect/find_package.lua b/xmake/modules/lib/detect/find_package.lua
index d3c9e57d1..dc1c92848 100644
--- a/xmake/modules/lib/detect/find_package.lua
+++ b/xmake/modules/lib/detect/find_package.lua
@@ -112,6 +112,11 @@ function main(name, opt)
if result and result.includedirs and opt.external then
result.sysincludedirs = result.includedirs
result.includedirs = nil
+ local components_base = result.components and result.components.__base
+ if components_base then
+ components_base.sysincludedirs = components_base.includedirs
+ components_base.includedirs = nil
+ end
end
-- cache result
diff --git a/xmake/modules/package/manager/xmake/find_package.lua b/xmake/modules/package/manager/xmake/find_package.lua
index f55601596..10c58436a 100644
--- a/xmake/modules/package/manager/xmake/find_package.lua
+++ b/xmake/modules/package/manager/xmake/find_package.lua
@@ -183,11 +183,11 @@ function _find_package_from_repo(name, opt)
end
-- inherit the other prefix variables
- local components_base = {includedirs = result.includedirs, linkdirs = result.linkdirs}
+ local components_base = {includedirs = table.clone(result.includedirs), linkdirs = table.clone(result.linkdirs)}
for name, values in pairs(vars) do
if name ~= "links" and name ~= "linkdirs" and name ~= "includedirs" then
result[name] = values
- components_base[name] = values
+ components_base[name] = table.clone(values)
end
end