summaryrefslogtreecommitdiff
path: root/core/src/lua-cjson
diff options
context:
space:
mode:
authorruki <[email protected]>2022-12-14 22:51:07 +0800
committerruki <[email protected]>2022-12-14 22:51:07 +0800
commit93b9a4a17898f515dfa33fe87da72090f091d00c (patch)
tree99601fdca4cc5478b3eccd76692608fa544928e8 /core/src/lua-cjson
parentadb203df39274ce53f07adfd152672887cc0453e (diff)
add lua and lua-cjson in xmake.sh
Diffstat (limited to 'core/src/lua-cjson')
-rwxr-xr-xcore/src/lua-cjson/xmake.sh17
1 files changed, 17 insertions, 0 deletions
diff --git a/core/src/lua-cjson/xmake.sh b/core/src/lua-cjson/xmake.sh
new file mode 100755
index 000000000..c39903d35
--- /dev/null
+++ b/core/src/lua-cjson/xmake.sh
@@ -0,0 +1,17 @@
+#!/bin/sh
+
+target "lua_cjson"
+ set_kind "static"
+ set_warnings "all"
+ if is_config "runtime" "luajit"; then
+ add_deps "luajit"
+ else
+ add_deps "lua"
+ fi
+ add_files "lua-cjson/dtoa.c"
+ add_files "lua-cjson/lua_cjson.c"
+ add_files "lua-cjson/strbuf.c"
+ add_files "lua-cjson/g_fmt.c"
+ # Use internal strtod() / g_fmt() code for performance and disable multi-thread
+ add_defines "NDEBUG" "USE_INTERNAL_FPCONV"
+