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/xmake.sh | |
| parent | 0d836bc3b2351a72f9f28b18fb7a291220825441 (diff) | |
fix xmake.sh
Diffstat (limited to 'core/src/lua-cjson/xmake.sh')
| -rwxr-xr-x | core/src/lua-cjson/xmake.sh | 16 |
1 files changed, 11 insertions, 5 deletions
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" |
