Browse Source

Add Wayland support for SDL package (#2553)

* add wayland support

* Update xmake.lua

---------

Co-authored-by: ruki <[email protected]>
Simon Pribylski 2 years ago
parent
commit
a12e2d8512
1 changed files with 5 additions and 1 deletions
  1. 5 1
      packages/l/libsdl/xmake.lua

+ 5 - 1
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"})
     add_configs("use_sdlmain", {description = "Use SDL_main entry point", default = true, type = "boolean"})
     if is_plat("linux") then
     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_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
     end
 
 
     if is_plat("wasm") then
     if is_plat("wasm") then
@@ -75,6 +76,9 @@ package("libsdl")
         if package:is_plat("linux") and package:config("with_x") then
         if package:is_plat("linux") and package:config("with_x") then
             package:add("deps", "libxext", {private = true})
             package:add("deps", "libxext", {private = true})
         end
         end
+        if package:is_plat("linux") and package:config("with_wayland") then
+            package:add("deps", "wayland", {private = true})
+        end
     end)
     end)
 
 
     on_component("main", function (package, component)
     on_component("main", function (package, component)
@@ -106,7 +110,7 @@ package("libsdl")
                     component:add("frameworks", "Cocoa", "Carbon", "ForceFeedback", "IOKit")
                     component:add("frameworks", "Cocoa", "Carbon", "ForceFeedback", "IOKit")
                 else
                 else
                     component:add("frameworks", "CoreBluetooth", "CoreGraphics", "CoreMotion", "OpenGLES", "UIKit")
                     component:add("frameworks", "CoreBluetooth", "CoreGraphics", "CoreMotion", "OpenGLES", "UIKit")
-		end
+		        end
                 if package:version():ge("2.0.14") then
                 if package:version():ge("2.0.14") then
                     package:add("frameworks", "CoreHaptics", "GameController")
                     package:add("frameworks", "CoreHaptics", "GameController")
                 end
                 end