Files
Blitz/xmake/BlitzClient.lua

48 lines
1.2 KiB
Lua

includes("Blitz.lua")
-- This should be temporary
opengl = "glbinding"
if is_plat("linux") and is_arch("arm64-v8a") then
opengl = "glew"
add_defines("BLITZ_GL_LOADER_GLEW")
end
add_requires("libsdl 2.28.5", {configs = {sdlmain = false}})
add_requires("imgui 1.90", {configs = {sdl2 = true, opengl3 = true}})
add_requires(opengl, "assimp 5.3.1", "nlohmann_json", "openal-soft", "stb")
-- 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", opengl, "assimp", "nlohmann_json", "openal-soft", "stb", "imgui")
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