[Bf-blender-cvs] [fb03a86b1bf] master: Have CMake be more strict when optional x11 libraries are missing but enabled

Sebastian Parborg noreply at git.blender.org
Wed Jul 31 16:18:03 CEST 2019


Commit: fb03a86b1bff047f95d42f9c23619cb9a89c9827
Author: Sebastian Parborg
Date:   Wed Jul 31 16:15:38 2019 +0200
Branches: master
https://developer.blender.org/rBfb03a86b1bff047f95d42f9c23619cb9a89c9827

Have CMake be more strict when optional x11 libraries are missing but enabled

Previously cmake would silently disable features that depended on
certain x11 libraries if they were not found. Now we instead error out
and inform the user that these are missing but optional.

Reviewed By: Brecht

Differential Revision: http://developer.blender.org/D5380

===================================================================

M	CMakeLists.txt

===================================================================

diff --git a/CMakeLists.txt b/CMakeLists.txt
index 4dd165b0185..f0ca98c44a3 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -852,7 +852,8 @@ if(WITH_X11)
     if(X11_Xinput_LIB)
       list(APPEND PLATFORM_LINKLIBS ${X11_Xinput_LIB})
     else()
-      set(WITH_X11_XINPUT OFF)
+      message(FATAL_ERROR "LibXi not found. Disable WITH_X11_XINPUT if you
+      want to build without tablet support")
     endif()
   endif()
 
@@ -863,7 +864,8 @@ if(WITH_X11)
     if(X11_Xxf86vmode_LIB)
       list(APPEND PLATFORM_LINKLIBS ${X11_Xxf86vmode_LIB})
     else()
-      set(WITH_X11_XF86VMODE OFF)
+      message(FATAL_ERROR "libXxf86vm not found. Disable WITH_X11_XF86VMODE if you
+      want to build without")
     endif()
   endif()
 
@@ -871,7 +873,8 @@ if(WITH_X11)
     if(X11_Xfixes_LIB)
       list(APPEND PLATFORM_LINKLIBS ${X11_Xfixes_LIB})
     else()
-      set(WITH_X11_XFIXES OFF)
+      message(FATAL_ERROR "libXfixes not found. Disable WITH_X11_XFIXES if you
+      want to build without")
     endif()
   endif()
 
@@ -881,7 +884,8 @@ if(WITH_X11)
     if(X11_Xrender_LIB)
       list(APPEND PLATFORM_LINKLIBS ${X11_Xrender_LIB})
     else()
-      set(WITH_X11_ALPHA OFF)
+      message(FATAL_ERROR "libXrender not found. Disable WITH_X11_ALPHA if you
+      want to build without")
     endif()
   endif()



More information about the Bf-blender-cvs mailing list