cmake/sdlchecks.cmake
changeset 8153 3e43c73ac79b
parent 8120 c858be546e5a
child 8159 427e8fdf6f69
equal deleted inserted replaced
8152:8f8e4958651c 8153:3e43c73ac79b
   502 
   502 
   503       set(CMAKE_REQUIRED_LIBRARIES)
   503       set(CMAKE_REQUIRED_LIBRARIES)
   504     endif(X11_LIB)
   504     endif(X11_LIB)
   505   endif(VIDEO_X11)
   505   endif(VIDEO_X11)
   506 endmacro(CheckX11)
   506 endmacro(CheckX11)
       
   507 
       
   508 macro(CheckMir)
       
   509     if(VIDEO_MIR)
       
   510         find_library(MIR_LIB mirclient mircommon egl)
       
   511         pkg_check_modules(MIR_TOOLKIT mirclient mircommon)
       
   512         pkg_check_modules(EGL egl)
       
   513         pkg_check_modules(XKB xkbcommon)
       
   514 
       
   515         if (MIR_LIB AND MIR_TOOLKIT_FOUND AND EGL_FOUND AND XKB_FOUND)
       
   516             set(HAVE_VIDEO_MIR TRUE)
       
   517             set(HAVE_SDL_VIDEO TRUE)
       
   518 
       
   519             file(GLOB MIR_SOURCES ${SDL2_SOURCE_DIR}/src/video/mir/*.c)
       
   520             set(SOURCE_FILES ${SOURCE_FILES} ${MIR_SOURCES})
       
   521             set(SDL_VIDEO_DRIVER_MIR 1)
       
   522 
       
   523             list(APPEND EXTRA_CFLAGS ${MIR_TOOLKIT_CFLAGS} ${EGL_CLFAGS} ${XKB_CLFLAGS})
       
   524             list(APPEND EXTRA_LDFLAGS ${MIR_TOOLKIT_LDFLAGS} ${EGL_LDLAGS} ${XKB_LDLAGS})
       
   525         endif (MIR_LIB AND MIR_TOOLKIT_FOUND AND EGL_FOUND AND XKB_FOUND)
       
   526     endif(VIDEO_MIR)
       
   527 endmacro(CheckMir)
   507 
   528 
   508 # Requires:
   529 # Requires:
   509 # - EGL
   530 # - EGL
   510 macro(CheckWayland)
   531 macro(CheckWayland)
   511   if(VIDEO_WAYLAND)
   532   if(VIDEO_WAYLAND)