diff options
| author | ruki <[email protected]> | 2021-09-18 16:03:53 +0800 |
|---|---|---|
| committer | GitHub <[email protected]> | 2021-09-18 16:03:53 +0800 |
| commit | 8a784a3c600eda3f631579f9127cf00b8ae52a69 (patch) | |
| tree | 01aa7cf0e26a2ab788b9d566a7eaa7fead87e331 /core/src/lua-cjson | |
| parent | 0108980f36b996d575a87c59ead44da8fd059490 (diff) | |
| parent | 1ccb90835e59ed093d4026c781cf7e6abe08fdec (diff) | |
Merge pull request #1683 from xmake-io/lua53
Add Lua53 backend
Diffstat (limited to 'core/src/lua-cjson')
| -rw-r--r-- | core/src/lua-cjson/makefile | 10 | ||||
| -rw-r--r-- | core/src/lua-cjson/xmake.lua | 2 |
2 files changed, 9 insertions, 3 deletions
diff --git a/core/src/lua-cjson/makefile b/core/src/lua-cjson/makefile index 9e96851ae..e1d53ecf9 100644 --- a/core/src/lua-cjson/makefile +++ b/core/src/lua-cjson/makefile @@ -22,8 +22,14 @@ lua-cjson_C_FILES += \ lua-cjson_CFLAGS += -DNDEBUG -DUSE_INTERNAL_FPCONV # includes -lua-cjson_INC_DIRS += \ - ../luajit/luajit/src +ifeq ($(BACKEND),luajit) +lua-cjson_INC_DIRS += ../luajit/luajit/src +lua-cjson_CXFLAGS += -DUSE_LUAJIT +endif +ifeq ($(BACKEND),lua) +lua-cjson_INC_DIRS += ../lua/lua +lua-cjson_CXFLAGS += -DLUA_COMPAT_5_1 -DLUA_COMPAT_5_2 +endif # use given system library? lua-cjson_C_FILES := $(if $(findstring cjson,$(base_LIBNAMES)),,$(lua-cjson_C_FILES)) diff --git a/core/src/lua-cjson/xmake.lua b/core/src/lua-cjson/xmake.lua index d2eec99f0..d3b12ded1 100644 --- a/core/src/lua-cjson/xmake.lua +++ b/core/src/lua-cjson/xmake.lua @@ -1,7 +1,7 @@ target("lua-cjson") set_kind("static") set_warnings("all") - add_deps("luajit") + add_deps(get_config("backend")) if is_plat("windows") then set_languages("c89") end |
