Skip to content

Commit

Permalink
Add Wayland support for SDL package (#2553)
Browse files Browse the repository at this point in the history
* add wayland support

* Update xmake.lua

---------

Co-authored-by: ruki <[email protected]>
  • Loading branch information
Persson-dev and waruqi authored Sep 4, 2023
1 parent f9225db commit a12e2d8
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion packages/l/libsdl/xmake.lua
Original file line number Diff line number Diff line change
Expand Up @@ -61,6 +61,7 @@ package("libsdl")
add_configs("use_sdlmain", {description = "Use SDL_main entry point", default = true, type = "boolean"})
if is_plat("linux") then
add_configs("with_x", {description = "Enables X support (requires it on the system)", default = true, type = "boolean"})
add_configs("with_wayland", {description = "Enables Wayland support (requires it on the system)", default = true, type = "boolean"})
end

if is_plat("wasm") then
Expand All @@ -75,6 +76,9 @@ package("libsdl")
if package:is_plat("linux") and package:config("with_x") then
package:add("deps", "libxext", {private = true})
end
if package:is_plat("linux") and package:config("with_wayland") then
package:add("deps", "wayland", {private = true})
end
end)

on_component("main", function (package, component)
Expand Down Expand Up @@ -106,7 +110,7 @@ package("libsdl")
component:add("frameworks", "Cocoa", "Carbon", "ForceFeedback", "IOKit")
else
component:add("frameworks", "CoreBluetooth", "CoreGraphics", "CoreMotion", "OpenGLES", "UIKit")
end
end
if package:version():ge("2.0.14") then
package:add("frameworks", "CoreHaptics", "GameController")
end
Expand Down

0 comments on commit a12e2d8

Please sign in to comment.