Fixed building with cmake when fcitx isn't installed
authorSam Lantinga <slouken@libsdl.org>
Fri, 14 Oct 2016 01:04:21 -0700
changeset 10533cd2e0b0c7ec5
parent 10532 b576db8b2346
child 10534 dde37ddd81bc
Fixed building with cmake when fcitx isn't installed
CMakeLists.txt
include/SDL_config.h.cmake
src/core/linux/SDL_fcitx.c
     1.1 --- a/CMakeLists.txt	Fri Oct 14 00:51:57 2016 -0700
     1.2 +++ b/CMakeLists.txt	Fri Oct 14 01:04:21 2016 -0700
     1.3 @@ -916,6 +916,8 @@
     1.4        endif()
     1.5      endif()
     1.6  
     1.7 +    check_include_file("fcitx/frontend.h" HAVE_FCITX_FRONTEND_H)
     1.8 +
     1.9    endif()
    1.10  
    1.11    if(INPUT_TSLIB)
     2.1 --- a/include/SDL_config.h.cmake	Fri Oct 14 00:51:57 2016 -0700
     2.2 +++ b/include/SDL_config.h.cmake	Fri Oct 14 01:04:21 2016 -0700
     2.3 @@ -82,6 +82,7 @@
     2.4  #cmakedefine HAVE_LIBUDEV_H 1
     2.5  #cmakedefine HAVE_DBUS_DBUS_H 1
     2.6  #cmakedefine HAVE_IBUS_IBUS_H 1
     2.7 +#cmakedefine HAVE_FCITX_FRONTEND_H 1
     2.8  
     2.9  /* C library functions */
    2.10  #cmakedefine HAVE_MALLOC 1
     3.1 --- a/src/core/linux/SDL_fcitx.c	Fri Oct 14 00:51:57 2016 -0700
     3.2 +++ b/src/core/linux/SDL_fcitx.c	Fri Oct 14 01:04:21 2016 -0700
     3.3 @@ -18,6 +18,9 @@
     3.4       misrepresented as being the original software.
     3.5    3. This notice may not be removed or altered from any source distribution.
     3.6  */
     3.7 +#include "SDL_config.h"
     3.8 +
     3.9 +#ifdef HAVE_FCITX_FRONTEND_H
    3.10  
    3.11  #include <fcitx/frontend.h>
    3.12  #include <unistd.h>
    3.13 @@ -545,4 +548,6 @@
    3.14      }
    3.15  }
    3.16  
    3.17 +#endif /* HAVE_FCITX_FRONTEND_H */
    3.18 +
    3.19  /* vi: set ts=4 sw=4 expandtab: */