CMake configuration is now stopped if the Xrandr library (Linux) is not found

This commit is contained in:
Laurent Gomila 2011-09-10 18:36:12 +02:00
parent d6c1fda5bd
commit 78a625de22

View File

@ -66,13 +66,13 @@ else() # MACOSX
${SRCROOT}/OSX/cpp_objc_conversion.h ${SRCROOT}/OSX/cpp_objc_conversion.h
${SRCROOT}/OSX/cpp_objc_conversion.mm ${SRCROOT}/OSX/cpp_objc_conversion.mm
${SRCROOT}/OSX/cg_sf_conversion.hpp ${SRCROOT}/OSX/cg_sf_conversion.hpp
${SRCROOT}/OSX/cg_sf_conversion.cpp ${SRCROOT}/OSX/cg_sf_conversion.cpp
${SRCROOT}/OSX/InputImpl.mm ${SRCROOT}/OSX/InputImpl.mm
${SRCROOT}/OSX/InputImpl.hpp ${SRCROOT}/OSX/InputImpl.hpp
${SRCROOT}/OSX/HIDInputManager.hpp ${SRCROOT}/OSX/HIDInputManager.hpp
${SRCROOT}/OSX/HIDInputManager.mm ${SRCROOT}/OSX/HIDInputManager.mm
${SRCROOT}/OSX/HIDJoystickManager.hpp ${SRCROOT}/OSX/HIDJoystickManager.hpp
${SRCROOT}/OSX/HIDJoystickManager.cpp ${SRCROOT}/OSX/HIDJoystickManager.cpp
${SRCROOT}/OSX/JoystickImpl.cpp ${SRCROOT}/OSX/JoystickImpl.cpp
${SRCROOT}/OSX/JoystickImpl.hpp ${SRCROOT}/OSX/JoystickImpl.hpp
${SRCROOT}/OSX/SFApplication.h ${SRCROOT}/OSX/SFApplication.h
@ -100,6 +100,9 @@ endif()
find_package(OpenGL REQUIRED) find_package(OpenGL REQUIRED)
if(LINUX) if(LINUX)
find_package(X11 REQUIRED) find_package(X11 REQUIRED)
if(NOT X11_Xrandr_FOUND)
message(FATAL_ERROR "Xrandr library not found")
endif()
endif() endif()
# build the list of external libraries to link # build the list of external libraries to link