Fixed bug 3590 - CMAKE: typos in CheckMir
authorSam Lantinga
Wed, 09 Aug 2017 18:47:33 -0700
changeset 112091374cc1666db
parent 11208 3d59240ebfd9
child 11210 c92070a96da5
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)
cmake/sdlchecks.cmake
     1.1 --- a/cmake/sdlchecks.cmake	Wed Aug 09 19:50:18 2017 -0400
     1.2 +++ b/cmake/sdlchecks.cmake	Wed Aug 09 18:47:33 2017 -0700
     1.3 @@ -561,7 +561,7 @@
     1.4  macro(CheckMir)
     1.5      if(VIDEO_MIR)
     1.6          find_library(MIR_LIB mirclient mircommon egl)
     1.7 -        pkg_check_modules(MIR_TOOLKIT mirclient mircommon)
     1.8 +        pkg_check_modules(MIR_TOOLKIT mirclient>=0.26 mircommon)
     1.9          pkg_check_modules(EGL egl)
    1.10          pkg_check_modules(XKB xkbcommon)
    1.11  
    1.12 @@ -573,7 +573,7 @@
    1.13              set(SOURCE_FILES ${SOURCE_FILES} ${MIR_SOURCES})
    1.14              set(SDL_VIDEO_DRIVER_MIR 1)
    1.15  
    1.16 -            list(APPEND EXTRA_CFLAGS ${MIR_TOOLKIT_CFLAGS} ${EGL_CLFAGS} ${XKB_CLFLAGS})
    1.17 +            list(APPEND EXTRA_CFLAGS ${MIR_TOOLKIT_CFLAGS} ${EGL_CFLAGS} ${XKB_CFLAGS})
    1.18  
    1.19              if(MIR_SHARED)
    1.20                  if(NOT HAVE_DLOPEN)
    1.21 @@ -1177,7 +1177,7 @@
    1.22        file(GLOB KMSDRM_SOURCES ${SDL2_SOURCE_DIR}/src/video/kmsdrm/*.c)
    1.23        set(SOURCE_FILES ${SOURCE_FILES} ${KMSDRM_SOURCES})
    1.24  
    1.25 -      list(APPEND EXTRA_CFLAGS ${KMSDRM_CLFLAGS})
    1.26 +      list(APPEND EXTRA_CFLAGS ${KMSDRM_CFLAGS})
    1.27  
    1.28        set(SDL_VIDEO_DRIVER_KMSDRM 1)
    1.29