Skip to content

Commit a12e2d8

Browse files
Persson-devwaruqi
andauthored
Add Wayland support for SDL package (#2553)
* add wayland support * Update xmake.lua --------- Co-authored-by: ruki <[email protected]>
1 parent f9225db commit a12e2d8

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

packages/l/libsdl/xmake.lua

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -61,6 +61,7 @@ package("libsdl")
6161
add_configs("use_sdlmain", {description = "Use SDL_main entry point", default = true, type = "boolean"})
6262
if is_plat("linux") then
6363
add_configs("with_x", {description = "Enables X support (requires it on the system)", default = true, type = "boolean"})
64+
add_configs("with_wayland", {description = "Enables Wayland support (requires it on the system)", default = true, type = "boolean"})
6465
end
6566

6667
if is_plat("wasm") then
@@ -75,6 +76,9 @@ package("libsdl")
7576
if package:is_plat("linux") and package:config("with_x") then
7677
package:add("deps", "libxext", {private = true})
7778
end
79+
if package:is_plat("linux") and package:config("with_wayland") then
80+
package:add("deps", "wayland", {private = true})
81+
end
7882
end)
7983

8084
on_component("main", function (package, component)
@@ -106,7 +110,7 @@ package("libsdl")
106110
component:add("frameworks", "Cocoa", "Carbon", "ForceFeedback", "IOKit")
107111
else
108112
component:add("frameworks", "CoreBluetooth", "CoreGraphics", "CoreMotion", "OpenGLES", "UIKit")
109-
end
113+
end
110114
if package:version():ge("2.0.14") then
111115
package:add("frameworks", "CoreHaptics", "GameController")
112116
end

0 commit comments

Comments
 (0)