set_project("Frostbite2D")
set_version("1.0.0")
set_license("MIT")

-- 语言和编码设置
set_languages("c++17")
set_encodings("utf-8")

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

local host_plat = "mingw"
local target_plat = get_config("plat") or host_plat
if target_plat == "windows" then
    target_plat = "mingw"
end
local supported_plats = {mingw = true, linux = true, macosx = true, switch = true}

-- 自动选择平台
if not supported_plats[target_plat] then
    os.exists(1)
end


-- 引入对应平台的配置文件
local platform_config_file = "platform/" .. target_plat .. ".lua"

if os.isfile(platform_config_file) then
    includes(platform_config_file)
else
    print("Platform config file not found: " .. platform_config_file)
end


