summaryrefslogtreecommitdiff
path: root/xmake
diff options
context:
space:
mode:
authorfallen ink <[email protected]>2021-04-28 10:56:23 +0800
committerfallen ink <[email protected]>2021-04-28 10:56:23 +0800
commitf56eed0f2ccb9bc7027fdff13a2ff2e9c1ea24d6 (patch)
tree41b0694d11eaa1662facb3a7d0c6083dad5c1e2b /xmake
parenta01adb5915ba8d370267edf02a2a7559ab628c19 (diff)
parent9f44201bbc86bde6e78fcf742ac0ec779cc3d3d0 (diff)
Merge remote-tracking branch 'upstream/master'
Diffstat (limited to 'xmake')
-rw-r--r--xmake/modules/core/tools/ml.lua2
-rw-r--r--xmake/modules/private/action/require/impl/register_packages.lua17
2 files changed, 11 insertions, 8 deletions
diff --git a/xmake/modules/core/tools/ml.lua b/xmake/modules/core/tools/ml.lua
index a90cade20..83da11fb6 100644
--- a/xmake/modules/core/tools/ml.lua
+++ b/xmake/modules/core/tools/ml.lua
@@ -87,7 +87,7 @@ end
-- make the includedir flag
function nf_includedir(self, dir)
- return {"-I", dir}
+ return {"-I" .. dir}
end
-- make the sysincludedir flag
diff --git a/xmake/modules/private/action/require/impl/register_packages.lua b/xmake/modules/private/action/require/impl/register_packages.lua
index 9bc1c52cb..4c326e770 100644
--- a/xmake/modules/private/action/require/impl/register_packages.lua
+++ b/xmake/modules/private/action/require/impl/register_packages.lua
@@ -88,20 +88,23 @@ function _register_required_package(instance, required_package)
_register_required_package_base(instance, required_package)
_register_required_package_libs(instance, required_package)
_register_required_package_envs(instance, envs)
- local orderdeps = instance:orderdeps()
- if orderdeps then
- local total = #orderdeps
- for idx, _ in ipairs(orderdeps) do
- local dep = orderdeps[total + 1 - idx]
+ local linkdeps = instance:linkdeps()
+ if linkdeps then
+ local total = #linkdeps
+ for idx, _ in ipairs(linkdeps) do
+ local dep = linkdeps[total + 1 - idx]
if dep then
- -- we can only inherit all link deps of library package
if instance:is_library() then
_register_required_package_libs(dep, required_package, true)
end
- _register_required_package_envs(dep, envs)
end
end
end
+ for _, dep in ipairs(instance:orderdeps()) do
+ if not dep:is_private() then
+ _register_required_package_envs(dep, envs)
+ end
+ end
if #table.keys(envs) > 0 then
required_package:add({envs = envs})
end