From 7fbf0569b97cc65c197d3d57ddef4dd2729b6173 Mon Sep 17 00:00:00 2001 From: Adriaan de Groot Date: Sat, 30 Sep 2006 20:09:54 +0000 Subject: [PATCH] Add cmake test to find xf86vmode.h -- which would live in the X includes dir, but I don't know how to get that directory from earlier checks, so look in likely places instead. Code based on FindSane.cmake. License of this 'code' is BSD. svn path=/trunk/KDE/kdegraphics/cmake/modules/; revision=590778 --- cmake/modules/FindXVidModeExtensions.cmake | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) create mode 100644 cmake/modules/FindXVidModeExtensions.cmake diff --git a/cmake/modules/FindXVidModeExtensions.cmake b/cmake/modules/FindXVidModeExtensions.cmake new file mode 100644 index 000000000..2db4eac32 --- /dev/null +++ b/cmake/modules/FindXVidModeExtensions.cmake @@ -0,0 +1,18 @@ +# cmake macro to test if we have xvidmode extensions - xf86 +# +# XVIDMODEEXTENSIONS_FOUND - system has XVIDMODEEXTENSIONS libs + +FIND_PATH(XVIDMODEEXTENSIONS_INCLUDE_DIR X11/extensions/xf86vmode.h + /usr/include + /usr/local/include + /usr/X11R6/include +) + +if (XVIDMODEEXTENSIONS_INCLUDE_DIR) + set(XVIDMODEEXTENSIONS_FOUND TRUE) + message(STATUS "Found X VidMode extensions: ${XVIDMODEEXTENSIONS_INCLUDE_DIR}") +else (XVIDMODEEXTENSIONS_INCLUDE_DIR) + set(XVIDMODEEXTENSIONS_FOUND FALSE) + message(STATUS "Did not find X VidMode extensions") +endif (XVIDMODEEXTENSIONS_INCLUDE_DIR) +