summaryrefslogtreecommitdiff
path: root/xmake/rules/xcode/bundle/xmake.lua
diff options
context:
space:
mode:
Diffstat (limited to 'xmake/rules/xcode/bundle/xmake.lua')
-rw-r--r--xmake/rules/xcode/bundle/xmake.lua5
1 files changed, 4 insertions, 1 deletions
diff --git a/xmake/rules/xcode/bundle/xmake.lua b/xmake/rules/xcode/bundle/xmake.lua
index 2e486cffd..5911e5fff 100644
--- a/xmake/rules/xcode/bundle/xmake.lua
+++ b/xmake/rules/xcode/bundle/xmake.lua
@@ -30,10 +30,13 @@ rule("xcode.bundle")
target:data_set("xcode.bundledir", bundledir)
-- set target info for bundle
- target:set("kind", "shared")
target:set("filename", target:basename())
target:set("targetdir", path.join(bundledir, "Contents", "MacOS"))
+ -- generate binary as bundle, we cannot set `-shared` or `-dynamiclib`
+ target:set("kind", "binary")
+ target:add("ldflags", "-bundle", {force = true})
+
-- register clean files for `xmake clean`
target:add("cleanfiles", bundledir)
end)