CMake produces an error if XInput.h is not found
[freeglut] / CMakeLists.txt
index 55f48ba..b4db0fd 100644 (file)
@@ -326,6 +326,8 @@ IF(UNIX AND NOT(ANDROID OR BLACKBERRY OR FREEGLUT_WAYLAND))
         # Needed for multi-touch:
         CHECK_INCLUDE_FILES("${X11_Xinput_INCLUDE_PATH}/X11/extensions/XInput2.h" HAVE_X11_EXTENSIONS_XINPUT2_H)
         LIST(APPEND LIBS ${X11_Xinput_LIB})
+    ELSE()
+        MESSAGE(FATAL_ERROR, "Missing X11's XInput.h (X11/extensions/XInput.h)")
     ENDIF()
 ENDIF()
 IF(ANDROID)
@@ -551,6 +553,7 @@ IF(UNIX)
 ENDIF()
 ADD_DEMO(subwin          progs/demos/subwin/subwin.c)
 ADD_DEMO(timer           progs/demos/timer/timer.c)
+ADD_DEMO(timer_callback  progs/demos/timer_callback/timer.c)