mirror of
https://github.com/encounter/SDL.git
synced 2025-12-09 05:27:48 +00:00
Wayland support
Based on the original port to Wayland by: Joel Teichroeb, Benjamin Franzke, Scott Moreau, et al. Additional changes in this commit, done by me: * Wayland uses the common EGL framework * EGL can now create a desktop OpenGL context * testgl2 loads GL functions dynamically, no need to link to libGL anymore * Assorted fixes to the Wayland backend Tested on the Weston Compositor (v1.0.5) that ships with Ubuntu 13.10, running Weston under X. Tests ran: testrendercopyex (all backends), testgl2, testgles2,testintersections
This commit is contained in:
@@ -505,6 +505,29 @@ macro(CheckX11)
|
||||
endif(VIDEO_X11)
|
||||
endmacro(CheckX11)
|
||||
|
||||
# Requires:
|
||||
# - EGL
|
||||
macro(CheckWayland)
|
||||
if(VIDEO_WAYLAND)
|
||||
pkg_check_modules(WAYLAND wayland-client wayland-cursor wayland-egl egl xkbcommon)
|
||||
if(WAYLAND_FOUND)
|
||||
link_directories(
|
||||
${WAYLAND_LIBRARY_DIRS}
|
||||
)
|
||||
include_directories(
|
||||
${WAYLAND_INCLUDE_DIRS}
|
||||
)
|
||||
set(EXTRA_LIBS ${WAYLAND_LIBRARIES} ${EXTRA_LIBS})
|
||||
set(HAVE_VIDEO_WAYLAND TRUE)
|
||||
set(HAVE_SDL_VIDEO TRUE)
|
||||
|
||||
file(GLOB WAYLAND_SOURCES ${SDL2_SOURCE_DIR}/src/video/wayland/*.c)
|
||||
set(SOURCE_FILES ${SOURCE_FILES} ${WAYLAND_SOURCES})
|
||||
set(SDL_VIDEO_DRIVER_WAYLAND 1)
|
||||
endif(WAYLAND_FOUND)
|
||||
endif(VIDEO_WAYLAND)
|
||||
endmacro(CheckWayland)
|
||||
|
||||
# Requires:
|
||||
# - n/a
|
||||
#
|
||||
|
||||
Reference in New Issue
Block a user