add_rules("mode.debug", "mode.release")


if is_plat("android") then 
    add_requires("zlib")
    add_defines("BLITZ_HEADLESS")
else
    add_requires("libsdl >= 2", "zlib", "glew")
end


-- Game files (with server)
target("Blitz")
    set_kind("static")
    set_languages("c++17")

    add_includedirs("include")
    add_files("src/blitz/**.cpp", "src/server/**.cpp")

    add_packages("zlib")





-- Server binary (headless)
target("BlitzServer")
    set_kind("binary")
    set_languages("c++17")
    set_default(false)

    add_includedirs("include")
    add_files("src/ServerMain.cpp")

    -- Libraries
    add_deps("Blitz")





-- Client binary (default)
target("BlitzClient")
    set_kind("binary")
    set_languages("c++17")
    set_default(true)

    add_includedirs("include")
    add_files("src/client/**.cpp", "src/ClientMain.cpp")

    -- Libraries
    add_deps("Blitz")
    add_packages("libsdl", "glew")
    
    add_includedirs("libs", "libs/imgui")
    add_files("libs/imgui/**.cpp")

    -- Assets
    set_rundir("$(projectdir)/assets")
