cmake/sdlchecks.cmake
changeset 8062 4fc5f66d63cc
parent 8017 d84a30e5cbd5
child 8120 c858be546e5a
     1.1 --- a/cmake/sdlchecks.cmake	Fri Dec 13 09:48:12 2013 -0300
     1.2 +++ b/cmake/sdlchecks.cmake	Sat Dec 14 20:18:43 2013 -0300
     1.3 @@ -506,6 +506,29 @@
     1.4  endmacro(CheckX11)
     1.5  
     1.6  # Requires:
     1.7 +# - EGL
     1.8 +macro(CheckWayland)
     1.9 +  if(VIDEO_WAYLAND)
    1.10 +    pkg_check_modules(WAYLAND wayland-client wayland-cursor wayland-egl egl xkbcommon)
    1.11 +    if(WAYLAND_FOUND)
    1.12 +      link_directories(
    1.13 +          ${WAYLAND_LIBRARY_DIRS}
    1.14 +      )
    1.15 +      include_directories(
    1.16 +          ${WAYLAND_INCLUDE_DIRS}
    1.17 +      )
    1.18 +      set(EXTRA_LIBS ${WAYLAND_LIBRARIES} ${EXTRA_LIBS})
    1.19 +      set(HAVE_VIDEO_WAYLAND TRUE)
    1.20 +      set(HAVE_SDL_VIDEO TRUE)
    1.21 +
    1.22 +      file(GLOB WAYLAND_SOURCES ${SDL2_SOURCE_DIR}/src/video/wayland/*.c)
    1.23 +      set(SOURCE_FILES ${SOURCE_FILES} ${WAYLAND_SOURCES})
    1.24 +      set(SDL_VIDEO_DRIVER_WAYLAND 1)
    1.25 +    endif(WAYLAND_FOUND)
    1.26 +  endif(VIDEO_WAYLAND)
    1.27 +endmacro(CheckWayland)
    1.28 +
    1.29 +# Requires:
    1.30  # - n/a
    1.31  #
    1.32  macro(CheckCOCOA)