diff options
| author | ruki <[email protected]> | 2024-04-05 16:21:00 +0800 |
|---|---|---|
| committer | GitHub <[email protected]> | 2024-04-05 16:21:00 +0800 |
| commit | 982a307fa363ae022554df2afaa3f922c5bb0986 (patch) | |
| tree | 279590bb6068b94eeade11693217b11d21e0db35 /xmake/rules | |
| parent | 282e468d6cf18473bac127d260fe802e7bb64392 (diff) | |
| parent | 5297e2329198a683400870382699af2f37d25ec2 (diff) | |
Merge pull request #4932 from xmake-io/native
Improve native shared module to remove lua package dependence
Diffstat (limited to 'xmake/rules')
| -rw-r--r-- | xmake/rules/module/xmake.lua | 6 |
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) |
