更新了 linux 配置 Sdl2远程包时 添加wayland 属性

This commit is contained in:
lenheart 2026-02-15 14:55:23 +08:00
parent 0700bad5d9
commit 174385e40f
1 changed files with 13 additions and 1 deletions

View File

@ -85,9 +85,21 @@ end
if target_plat ~= "switch" then
add_requires("glm")
add_requires("nlohmann_json")
add_requires("libsdl2")
local sdl2_configs = {
configs = {
wayland = false
}
}
if target_plat == "linux" then
local is_wayland = os.getenv("XDG_SESSION_TYPE") == "wayland"
if is_wayland then
sdl2_configs.configs.wayland = true
end
end
add_requires("libsdl2", sdl2_configs)
end
-- ==============================================
-- 加载构建目标
-- ==============================================