Add Wayland support for SDL package (#2553)

* add wayland support

* Update xmake.lua

---------

Co-authored-by: ruki <waruqi@gmail.com>
pull/2562/head
Simon Pribylski 2 years ago committed by GitHub
parent f9225dbef7
commit a12e2d8512
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
  1. 6
      packages/l/libsdl/xmake.lua

@ -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
@ -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)
@ -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

Loading…
Cancel
Save