42 lines
1.0 KiB
Lua
42 lines
1.0 KiB
Lua
includes("Blitz.lua")
|
|
|
|
add_requires("libsdl 2.28.3", {configs = {sdlmain = false}})
|
|
add_requires("glbinding >= 3", "assimp", "nlohmann_json")
|
|
|
|
-- Client binary (default)
|
|
target("BlitzClient")
|
|
if is_plat("android") then
|
|
set_kind("shared")
|
|
else
|
|
set_kind("binary")
|
|
end
|
|
|
|
set_default(true)
|
|
|
|
add_includedirs("../include")
|
|
add_files("../src/client/**.cpp", "../src/ClientMain.cpp")
|
|
|
|
-- Libraries
|
|
add_deps("Blitz")
|
|
add_packages("libsdl", "glbinding", "assimp", "nlohmann_json")
|
|
|
|
add_includedirs("../libs", "../libs/imgui")
|
|
add_files("../libs/imgui/**.cpp")
|
|
|
|
if is_plat("macosx") then
|
|
add_frameworks("OpenGL")
|
|
elseif is_plat("windows") then
|
|
add_ldflags("/LTCG") -- fix compiltation of glbinding
|
|
end
|
|
|
|
-- Assets
|
|
set_rundir("../assets")
|
|
|
|
-- Valgrind test
|
|
if is_mode("valgrind") then
|
|
on_run(function (target)
|
|
os.cd("../assets")
|
|
os.execv("valgrind", {"-s", "--leak-check=full", target:targetfile()})
|
|
end)
|
|
end
|