Add XF86keysym.h detection and use to CMake system, for r34983.
authorGuillermo S. Romero <gsr.b3d@infernal-iceberg.com>
Sat, 19 Feb 2011 23:51:55 +0000 (23:51 +0000)
committerGuillermo S. Romero <gsr.b3d@infernal-iceberg.com>
Sat, 19 Feb 2011 23:51:55 +0000 (23:51 +0000)
CMakeLists.txt
intern/ghost/CMakeLists.txt

index f4bc1c7..440170e 100644 (file)
@@ -338,6 +338,7 @@ if(UNIX AND NOT APPLE)
        endif()
 
        find_package(X11 REQUIRED)
+       find_path(X11_XF86keysym_INCLUDE_PATH X11/XF86keysym.h ${X11_INC_SEARCH_PATH})
 
        # OpenSuse needs lutil, ArchLinux not, for now keep, can avoid by using --as-needed
        set(LLIBS "-lutil -lc -lm -lpthread -lstdc++ ${X11_X11_LIB} ${X11_Xinput_LIB}")
index b77236a..33185a6 100644 (file)
@@ -134,6 +134,11 @@ elseif(UNIX)
 
        add_definitions(-DPREFIX="${CMAKE_INSTALL_PREFIX}")
 
+       if(X11_XF86keysym_INCLUDE_PATH)
+               add_definitions(-DWITH_XF86KEYSYM)
+               list(APPEND INC ${X11_XF86keysym_INCLUDE_PATH})
+       endif()
+
 elseif(WIN32)
        if(MSVC)
                set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} /WX")