summaryrefslogtreecommitdiff
path: root/core/xmake.sh
diff options
context:
space:
mode:
authorruki <[email protected]>2022-12-17 20:45:35 +0800
committerruki <[email protected]>2022-12-17 20:46:41 +0800
commit807c83c68af2d65974ff99fbf8e994112c63b0bc (patch)
tree019290aa9944823bcf96596e00052ae793488cd3 /core/xmake.sh
parent5d7efff981b2bb2c8806eb57354a73dac7ccd2f1 (diff)
improve luajit deps
Diffstat (limited to 'core/xmake.sh')
-rwxr-xr-xcore/xmake.sh16
1 files changed, 16 insertions, 0 deletions
diff --git a/core/xmake.sh b/core/xmake.sh
index 1528d3400..9b1640ecc 100755
--- a/core/xmake.sh
+++ b/core/xmake.sh
@@ -67,6 +67,22 @@ option_find_lua() {
option_end
}
+# the lua option
+option "luajit"
+ add_cfuncs "lua_pushstring"
+ add_cincludes "lua.h" "lualib.h" "lauxlib.h"
+ add_defines "USE_LUAJIT"
+ before_check "option_find_luajit"
+option_end
+
+option_find_luajit() {
+ option "luajit"
+ add_cflags `pkg-config --cflags luajit 2>/dev/null`
+ add_ldflags `pkg-config --libs luajit 2>/dev/null`
+ option_end
+}
+
+
# add projects
if ! has_config "lua"; then
if is_config "runtime" "luajit"; then