Commit d3af447ee5eaf9eec6c3c01ae583df2b415c4620

Sam Lantinga 2017-08-09T18:47:33

Fixed bug 3590 - CMAKE: typos in CheckMir Martin Gerhardy - list(APPEND EXTRA_CFLAGS ${MIR_TOOLKIT_CFLAGS} ${EGL_CLFAGS} ${XKB_CLFLAGS}) + list(APPEND EXTRA_CFLAGS ${MIR_TOOLKIT_CFLAGS} ${EGL_CFLAGS} ${XKB_CFLAGS}) CFLAGS is spelled wrong in two different ways for EGL and XKB And while you are on it... sdl needs mir >= 0.24 afaik - it fails on travis-ci (ubuntu 14.04 LTS with 0.18 installed and in other environments, too (e.g. https://github.com/urho3d/Urho3D/issues/1685) To fix this one should add a min version check to pkg_check_modules like this - pkg_check_modules(MIR_TOOLKIT mirclient mircommon) + pkg_check_modules(MIR_TOOLKIT mirclient>=0.24 mircommon)

diff --git a/cmake/sdlchecks.cmake b/cmake/sdlchecks.cmake
index 4ce64c2..7ce9bc9 100644
--- a/cmake/sdlchecks.cmake
+++ b/cmake/sdlchecks.cmake
@@ -561,7 +561,7 @@ endmacro()
 macro(CheckMir)
     if(VIDEO_MIR)
         find_library(MIR_LIB mirclient mircommon egl)
-        pkg_check_modules(MIR_TOOLKIT mirclient mircommon)
+        pkg_check_modules(MIR_TOOLKIT mirclient>=0.26 mircommon)
         pkg_check_modules(EGL egl)
         pkg_check_modules(XKB xkbcommon)
 
@@ -573,7 +573,7 @@ macro(CheckMir)
             set(SOURCE_FILES ${SOURCE_FILES} ${MIR_SOURCES})
             set(SDL_VIDEO_DRIVER_MIR 1)
 
-            list(APPEND EXTRA_CFLAGS ${MIR_TOOLKIT_CFLAGS} ${EGL_CLFAGS} ${XKB_CLFLAGS})
+            list(APPEND EXTRA_CFLAGS ${MIR_TOOLKIT_CFLAGS} ${EGL_CFLAGS} ${XKB_CFLAGS})
 
             if(MIR_SHARED)
                 if(NOT HAVE_DLOPEN)
@@ -1177,7 +1177,7 @@ macro(CheckKMSDRM)
       file(GLOB KMSDRM_SOURCES ${SDL2_SOURCE_DIR}/src/video/kmsdrm/*.c)
       set(SOURCE_FILES ${SOURCE_FILES} ${KMSDRM_SOURCES})
 
-      list(APPEND EXTRA_CFLAGS ${KMSDRM_CLFLAGS})
+      list(APPEND EXTRA_CFLAGS ${KMSDRM_CFLAGS})
 
       set(SDL_VIDEO_DRIVER_KMSDRM 1)