summaryrefslogtreecommitdiff
path: root/xmake
diff options
context:
space:
mode:
authorSaikari <[email protected]>2026-01-27 22:49:02 +0300
committerSaikari <[email protected]>2026-01-27 22:49:02 +0300
commita9761ddbd051326d11682be707e672158cd2710b (patch)
treeb3cff09342eade8d461e7099e7d5aaba9de68f89 /xmake
parent02f221f1877719da333190d203b2079b6d58513f (diff)
feat: implement getMsg function and update test files for static/shared libraries
Diffstat (limited to 'xmake')
-rw-r--r--xmake/rules/nim/build/target.lua20
1 files changed, 20 insertions, 0 deletions
diff --git a/xmake/rules/nim/build/target.lua b/xmake/rules/nim/build/target.lua
index a292e7cf7..948e317f3 100644
--- a/xmake/rules/nim/build/target.lua
+++ b/xmake/rules/nim/build/target.lua
@@ -109,6 +109,26 @@ function build_sourcefiles(target, sourcebatch, opt)
end
end
end
+
+ -- add includedirs from dependencies (for static/shared lib with exportc)
+ -- the dependencies will be compiled via imported symbol at the end
+ -- we need pass includedirs of static/shared lib to the target
+ local includedirs = {}
+ for _, dep in ipairs(target:orderdeps()) do
+ if dep:kind() == "static" or dep:kind() == "shared" then
+ table.join2(includedirs, dep:get("includedirs"))
+ end
+ end
+ if #includedirs > 0 then
+ -- deduplicate
+ includedirs = table.unique(includedirs)
+ for _, includedir in ipairs(includedirs) do
+ local includeflags = compinst:_tool():nf_includedir(includedir)
+ if includeflags then
+ table.join2(compflags, includeflags)
+ end
+ end
+ end
-- load dependent info
local dependinfo = option.get("rebuild") and {} or (depend.load(dependfile) or {})