Skip to content

Commit

Permalink
improve to detect lua
Browse files Browse the repository at this point in the history
  • Loading branch information
waruqi committed Nov 16, 2023
1 parent d933a04 commit d7cac5b
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions core/xmake.sh
Original file line number Diff line number Diff line change
Expand Up @@ -87,8 +87,16 @@ option_find_lua() {
local ldflags=""
local cflags=""
option "lua"
# detect lua5.4 on debian
cflags=`pkg-config --cflags lua5.4 2>/dev/null`
ldflags=`pkg-config --libs lua5.4 2>/dev/null`
# detect it on fedora
if test_z "${cflags}"; then
cflags=`pkg-config --cflags lua 2>/dev/null`
fi
if test_z "${ldflags}"; then
ldflags=`pkg-config --libs lua 2>/dev/null`
fi
if test_z "${cflags}"; then
cflags="-I/usr/include/lua5.4"
fi
Expand Down

0 comments on commit d7cac5b

Please sign in to comment.