diff options
| author | ruki <[email protected]> | 2023-01-19 23:31:25 +0800 |
|---|---|---|
| committer | ruki <[email protected]> | 2023-01-19 23:31:25 +0800 |
| commit | 685000fcb6d6eed642e3b56b345dc25caec999c4 (patch) | |
| tree | bf241bcdfd49d7b5b057a7bf6b5d26d69621c995 /core/src/lua-cjson | |
| parent | 0d836bc3b2351a72f9f28b18fb7a291220825441 (diff) | |
fix xmake.sh
Diffstat (limited to 'core/src/lua-cjson')
| -rw-r--r-- | core/src/lua-cjson/xmake.lua | 6 | ||||
| -rwxr-xr-x | core/src/lua-cjson/xmake.sh | 16 |
2 files changed, 16 insertions, 6 deletions
diff --git a/core/src/lua-cjson/xmake.lua b/core/src/lua-cjson/xmake.lua index fa7855150..e4206c9fc 100644 --- a/core/src/lua-cjson/xmake.lua +++ b/core/src/lua-cjson/xmake.lua @@ -1,7 +1,11 @@ target("lua-cjson") set_kind("static") set_warnings("all") - add_deps("lua") + if is_config("runtime", "luajit") then + add_deps("luajit") + else + add_deps("lua") + end if is_plat("windows") then set_languages("c89") end diff --git a/core/src/lua-cjson/xmake.sh b/core/src/lua-cjson/xmake.sh index f7d8b94b2..f3ab17546 100755 --- a/core/src/lua-cjson/xmake.sh +++ b/core/src/lua-cjson/xmake.sh @@ -4,12 +4,18 @@ target "lua_cjson" set_kind "static" set_default false set_warnings "all" - if is_config "runtime" "luajit" && has_config "luajit"; then - add_options "luajit" "{public}" - elif has_config "lua"; then - add_options "lua" "{public}" + if is_config "runtime" "luajit"; then + if has_config "luajit"; then + add_options "luajit" "{public}" + elif ! has_config "external"; then + add_deps "luajit" + fi else - add_deps "lua" + if has_config "lua"; then + add_options "lua" "{public}" + elif ! has_config "external"; then + add_deps "lua" + fi fi add_files "lua-cjson/dtoa.c" add_files "lua-cjson/lua_cjson.c" |
