cmake/sdlchecks.cmake
changeset 8153 3e43c73ac79b
parent 8120 c858be546e5a
child 8159 427e8fdf6f69
     1.1 --- a/cmake/sdlchecks.cmake	Sun Feb 02 21:38:16 2014 -0500
     1.2 +++ b/cmake/sdlchecks.cmake	Sun Feb 02 23:41:46 2014 -0500
     1.3 @@ -505,6 +505,27 @@
     1.4    endif(VIDEO_X11)
     1.5  endmacro(CheckX11)
     1.6  
     1.7 +macro(CheckMir)
     1.8 +    if(VIDEO_MIR)
     1.9 +        find_library(MIR_LIB mirclient mircommon egl)
    1.10 +        pkg_check_modules(MIR_TOOLKIT mirclient mircommon)
    1.11 +        pkg_check_modules(EGL egl)
    1.12 +        pkg_check_modules(XKB xkbcommon)
    1.13 +
    1.14 +        if (MIR_LIB AND MIR_TOOLKIT_FOUND AND EGL_FOUND AND XKB_FOUND)
    1.15 +            set(HAVE_VIDEO_MIR TRUE)
    1.16 +            set(HAVE_SDL_VIDEO TRUE)
    1.17 +
    1.18 +            file(GLOB MIR_SOURCES ${SDL2_SOURCE_DIR}/src/video/mir/*.c)
    1.19 +            set(SOURCE_FILES ${SOURCE_FILES} ${MIR_SOURCES})
    1.20 +            set(SDL_VIDEO_DRIVER_MIR 1)
    1.21 +
    1.22 +            list(APPEND EXTRA_CFLAGS ${MIR_TOOLKIT_CFLAGS} ${EGL_CLFAGS} ${XKB_CLFLAGS})
    1.23 +            list(APPEND EXTRA_LDFLAGS ${MIR_TOOLKIT_LDFLAGS} ${EGL_LDLAGS} ${XKB_LDLAGS})
    1.24 +        endif (MIR_LIB AND MIR_TOOLKIT_FOUND AND EGL_FOUND AND XKB_FOUND)
    1.25 +    endif(VIDEO_MIR)
    1.26 +endmacro(CheckMir)
    1.27 +
    1.28  # Requires:
    1.29  # - EGL
    1.30  macro(CheckWayland)