package An official xmake package repository
https://xrepo.xmake.io/
You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
30 lines
1.0 KiB
30 lines
1.0 KiB
add_rules("mode.release") |
|
target("genie") |
|
set_kind("binary") |
|
on_load(function (target) |
|
local lua_ver |
|
for _, dir in ipairs(os.dirs("src/host/*")) do |
|
if dir:find("lua-", 1, true) then |
|
lua_ver = dir:match("lua%-(%d+%.%d+%.%d+)") |
|
break |
|
end |
|
end |
|
assert(lua_ver, "lua directory not found!") |
|
local lua_src = "src/host/lua-" .. lua_ver .. "/src" |
|
target:add("includedirs", lua_src) |
|
target:add("files", lua_src .. "/*.c|lua.c|luac.c") |
|
end) |
|
add_files("src/host/*.c") |
|
add_defines("LUA_COMPAT_MODULE") |
|
if is_plat("windows", "mingw", "msys") then |
|
add_syslinks("ole32") |
|
elseif is_plat("macosx") then |
|
add_defines("LUA_USE_MACOSX") |
|
add_frameworks("CoreServices") |
|
elseif is_plat("linux") then |
|
add_defines("LUA_USE_POSIX", "LUA_USE_DLOPEN", "_FILE_OFFSET_BITS=64") |
|
add_syslinks("dl", "m") |
|
elseif is_plat("bsd") then |
|
add_defines("LUA_USE_POSIX", "LUA_USE_DLOPEN") |
|
add_syslinks("m") |
|
end
|
|
|