summaryrefslogtreecommitdiff
path: root/xmake/rules/module/xmake.lua
diff options
context:
space:
mode:
Diffstat (limited to 'xmake/rules/module/xmake.lua')
-rw-r--r--xmake/rules/module/xmake.lua6
1 files changed, 5 insertions, 1 deletions
diff --git a/xmake/rules/module/xmake.lua b/xmake/rules/module/xmake.lua
index f70c71d7e..0515bd842 100644
--- a/xmake/rules/module/xmake.lua
+++ b/xmake/rules/module/xmake.lua
@@ -29,11 +29,15 @@ rule("module.binary")
rule("module.shared")
add_deps("utils.symbols.export_all")
on_load(function (target)
- assert(not xmake.luajit(), "rule(module.shared) only support for lua54 runtime!")
import("core.project.config")
target:set("kind", "shared")
target:set("basename", "module_" .. target:name())
target:set("targetdir", config.buildir())
target:set("strip", "none")
+ target:add("includedirs", path.join(os.programdir(), "scripts", "module"))
+ target:add("includedirs", path.join(os.programdir(), "scripts", "module", "luawrap"))
+ if xmake.luajit() then
+ target:add("defines", "XMI_USE_LUAJIT")
+ end
end)