Frostbite2D/xmake.lua

31 lines
707 B
Lua
Raw Normal View History

2026-02-17 13:28:38 +08:00
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 = os.host()
local target_plat = get_config("plat") or host_plat
local supported_plats = {mingw = true, windows = true, linux = true, macosx = true, switch = true}
-- 自动选择平台
if not supported_plats[target_plat] then
2026-02-21 02:34:51 +08:00
os.exists(1)
2026-02-17 13:28:38 +08:00
end
-- 引入对应平台的配置文件
local platform_config_file = "platform/" .. target_plat .. ".lua"
2026-02-21 02:34:51 +08:00
2026-02-17 13:28:38 +08:00
if os.isfile(platform_config_file) then
includes(platform_config_file)
else
print("Platform config file not found: " .. platform_config_file)
end