38 lines
1010 B
Lua
38 lines
1010 B
Lua
-- ==============================================
|
|
-- Extra2D for Nintendo Switch - Xmake Build Script
|
|
-- Purpose: Build Extra2D static library and Switch demo programs
|
|
-- Platform: Nintendo Switch (ARM64)
|
|
-- Graphics: Desktop OpenGL 3.3+ via Mesa EGL
|
|
-- Audio: SDL2_mixer
|
|
-- ==============================================
|
|
|
|
set_project("Extra2D")
|
|
set_version("3.1.0")
|
|
set_languages("c++17")
|
|
set_encodings("utf-8")
|
|
add_rules("mode.debug", "mode.release")
|
|
|
|
-- ==============================================
|
|
-- 包含子模块配置
|
|
-- ==============================================
|
|
|
|
-- 包含工具链定义
|
|
includes("xmake/toolchains/switch.lua")
|
|
|
|
-- 定义 Switch 工具链
|
|
define_switch_toolchain()
|
|
|
|
-- 包含目标定义
|
|
includes("xmake/targets/extra2d.lua")
|
|
includes("xmake/targets/examples.lua")
|
|
|
|
-- ==============================================
|
|
-- 定义构建目标
|
|
-- ==============================================
|
|
|
|
-- Extra2D 引擎库
|
|
define_extra2d_target()
|
|
|
|
-- 示例程序
|
|
define_example_targets()
|