summaryrefslogtreecommitdiff
path: root/xmake/rules/kotlin-native/xmake.lua
diff options
context:
space:
mode:
authorruki <[email protected]>2025-02-20 22:43:03 +0800
committerruki <[email protected]>2025-02-20 22:43:03 +0800
commit48065b9580ec329b67a48ce4c7dd79c606ac2aa2 (patch)
tree318be1b1affde940f5d09af1a4d4aeb1c8248dc6 /xmake/rules/kotlin-native/xmake.lua
parent0a438f8721806ae97b97c592a5dbc036c3f7ae4d (diff)
improve static/shared library for kotlin
Diffstat (limited to 'xmake/rules/kotlin-native/xmake.lua')
-rw-r--r--xmake/rules/kotlin-native/xmake.lua6
1 files changed, 6 insertions, 0 deletions
diff --git a/xmake/rules/kotlin-native/xmake.lua b/xmake/rules/kotlin-native/xmake.lua
index 7b359094a..be3c39bac 100644
--- a/xmake/rules/kotlin-native/xmake.lua
+++ b/xmake/rules/kotlin-native/xmake.lua
@@ -23,9 +23,15 @@ rule("kotlin-native.build")
on_load(function (target)
if target:is_static() then
target:add("arflags", {"-produce", "static"}, {force = true})
+ target:add("includedirs", target:targetdir(), {interface = true})
+ if target:is_plat("macosx") then
+ target:add("frameworks", "Foundation", "CoreFoundation", {interface = true})
+ end
elseif target:is_shared() then
target:add("shflags", {"-produce", "dynamic"}, {force = true})
+ target:add("includedirs", target:targetdir(), {interface = true})
end
+ target:set("policy", "build.fence", true)
end)
on_build("build.target")