diff options
| author | ruki <[email protected]> | 2022-12-17 20:45:35 +0800 |
|---|---|---|
| committer | ruki <[email protected]> | 2022-12-17 20:46:41 +0800 |
| commit | 807c83c68af2d65974ff99fbf8e994112c63b0bc (patch) | |
| tree | 019290aa9944823bcf96596e00052ae793488cd3 /core/src | |
| parent | 5d7efff981b2bb2c8806eb57354a73dac7ccd2f1 (diff) | |
improve luajit deps
Diffstat (limited to 'core/src')
| -rwxr-xr-x | core/src/lua-cjson/xmake.sh | 4 | ||||
| -rwxr-xr-x | core/src/xmake/xmake.sh | 9 |
2 files changed, 11 insertions, 2 deletions
diff --git a/core/src/lua-cjson/xmake.sh b/core/src/lua-cjson/xmake.sh index 42e767218..134173051 100755 --- a/core/src/lua-cjson/xmake.sh +++ b/core/src/lua-cjson/xmake.sh @@ -4,7 +4,9 @@ target "lua_cjson" set_kind "static" set_default false set_warnings "all" - if has_config "lua"; then + if is_config "runtime" "luajit" && has_config "luajit"; then + add_options "luajit" "{public}" + elif has_config "lua"; then add_options "lua" "{public}" else add_deps "lua" diff --git a/core/src/xmake/xmake.sh b/core/src/xmake/xmake.sh index 2fc04b8e4..93ca26cfc 100755 --- a/core/src/xmake/xmake.sh +++ b/core/src/xmake/xmake.sh @@ -6,7 +6,7 @@ target "xmake" # add deps add_deps "sv" "lz4" "tbox" - local libs="lua_cjson lua" + local libs="lua_cjson" for lib in $libs; do if has_config "$lib"; then add_options "$lib" "{public}" @@ -14,6 +14,13 @@ target "xmake" add_deps "$lib" fi done + if is_config "runtime" "luajit" && has_config "luajit"; then + add_options "luajit" "{public}" + elif has_config "lua"; then + add_options "lua" "{public}" + else + add_deps "lua" + fi # add defines add_defines "__tb_prefix__=\"xmake\"" |
