Browse Source

cmake X11 : make sure we reset X11 libraries when they are not found

Otherwise, as we link them anyways, it will fail on non X11 Linux.
Lionel CHAZALLON 9 years ago
parent
commit
26be068c9c
1 changed files with 3 additions and 0 deletions
  1. 3 0
      CMakeModules/LinuxConfiguration.cmake

+ 3 - 0
CMakeModules/LinuxConfiguration.cmake

@@ -3,6 +3,9 @@ if(X11_FOUND AND X11_Xrandr_FOUND)
   include_directories(X11_X11_INCLUDE_PATH X11_Xrandr_INCLUDE_PATH)
   set(X11XRANDR_FOUND 1)
   add_definitions(-DUSE_X11XRANDR)
+else()
+  set(X11_LIBRARIES "")
+  set(X11_Xrandr_LIB "")
 endif()
 
 if (NOT BUILD_TARGET STREQUAL "RPI")