disable xinerama and xinput if libraries are missing.
authorCampbell Barton <ideasman42@gmail.com>
Thu, 31 Jan 2013 20:41:47 +0000 (20:41 +0000)
committerCampbell Barton <ideasman42@gmail.com>
Thu, 31 Jan 2013 20:41:47 +0000 (20:41 +0000)
CMakeLists.txt

index fbacb37b24eeb8ee551d3113bdbf0cae1d9dae5d..f5bca0a071f976d7fc1ae0099bc37b441ecfe0b5 100644 (file)
@@ -799,11 +799,19 @@ if(UNIX AND NOT APPLE)
                set(PLATFORM_LINKLIBS "${PLATFORM_LINKLIBS} ${X11_X11_LIB}")
 
                if(WITH_X11_XINPUT)
                set(PLATFORM_LINKLIBS "${PLATFORM_LINKLIBS} ${X11_X11_LIB}")
 
                if(WITH_X11_XINPUT)
-                       set(PLATFORM_LINKLIBS "${PLATFORM_LINKLIBS} ${X11_Xinput_LIB}")
+                       if(X11_Xinput_LIB)
+                               set(PLATFORM_LINKLIBS "${PLATFORM_LINKLIBS} ${X11_Xinput_LIB}")
+                       else()
+                               set(WITH_X11_XINPUT OFF)
+                       endif()
                endif()
 
                if(WITH_X11_XINERAMA)
                endif()
 
                if(WITH_X11_XINERAMA)
-                       set(PLATFORM_LINKLIBS "${PLATFORM_LINKLIBS} ${X11_Xinerama_LIB}")
+                       if(X11_Xinerama_LIB)
+                               set(PLATFORM_LINKLIBS "${PLATFORM_LINKLIBS} ${X11_Xinerama_LIB}")
+                       else()
+                               set(WITH_X11_XINERAMA OFF)
+                       endif()
                endif()
 
                if(WITH_X11_XF86VMODE)
                endif()
 
                if(WITH_X11_XF86VMODE)
@@ -2138,6 +2146,7 @@ if(FIRST_RUN)
        info_cfg_option(WITH_INSTALL_PORTABLE)
        info_cfg_option(WITH_X11_XF86VMODE)
        info_cfg_option(WITH_X11_XINPUT)
        info_cfg_option(WITH_INSTALL_PORTABLE)
        info_cfg_option(WITH_X11_XF86VMODE)
        info_cfg_option(WITH_X11_XINPUT)
+       info_cfg_option(WITH_X11_XINERAMA)
        info_cfg_option(WITH_MEM_JEMALLOC)
        info_cfg_option(WITH_SYSTEM_GLEW)
        info_cfg_option(WITH_SYSTEM_OPENJPEG)
        info_cfg_option(WITH_MEM_JEMALLOC)
        info_cfg_option(WITH_SYSTEM_GLEW)
        info_cfg_option(WITH_SYSTEM_OPENJPEG)