summaryrefslogtreecommitdiff
path: root/tests/projects/other/native_module/modules/shared/foo/xmake.lua
diff options
context:
space:
mode:
authorruki <[email protected]>2024-04-02 23:19:26 +0800
committerruki <[email protected]>2024-04-02 23:19:26 +0800
commitdb26e2a6ddeac9331bc093a1562c04c0b6e0b339 (patch)
tree75f998a02d14c60d5fc75cad2b16026c30cb056c /tests/projects/other/native_module/modules/shared/foo/xmake.lua
parent180cd63712a9b0474ca6831f139a9f94a35709f7 (diff)
improve luajit support for native module
Diffstat (limited to 'tests/projects/other/native_module/modules/shared/foo/xmake.lua')
-rw-r--r--tests/projects/other/native_module/modules/shared/foo/xmake.lua6
1 files changed, 5 insertions, 1 deletions
diff --git a/tests/projects/other/native_module/modules/shared/foo/xmake.lua b/tests/projects/other/native_module/modules/shared/foo/xmake.lua
index ad4590ffa..7d3899f95 100644
--- a/tests/projects/other/native_module/modules/shared/foo/xmake.lua
+++ b/tests/projects/other/native_module/modules/shared/foo/xmake.lua
@@ -1,6 +1,10 @@
add_rules("mode.debug", "mode.release")
-add_requires("lua 5.4")
+if xmake.luajit() then
+ add_requires("luajit", {alias = "lua"})
+else
+ add_requires("lua 5.4")
+end
target("foo")
add_rules("module.shared")