渲染后端加入
This commit is contained in:
29
xmake.lua
Normal file
29
xmake.lua
Normal file
@@ -0,0 +1,29 @@
|
||||
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
|
||||
raise("Unsupported platform: " .. target_plat .. ". Supported platforms: mingw, windows, linux, macosx, switch")
|
||||
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
|
||||
|
||||
|
||||
Reference in New Issue
Block a user