[1/5] cmake: Search for udev.pc on Linux

Submitted by Chad Versace on Feb. 9, 2014, 9:31 p.m.

Details

Message ID 1391981476-24780-2-git-send-email-chad.versace@linux.intel.com
State New
Headers show

Not browsing as part of any series.

Commit Message

Chad Versace Feb. 9, 2014, 9:31 p.m.
If found, add PIGLIT_HAS_UDEV to CFLAGS and set the cmake variable of
the same name.

Future tests for EGL_MESA_platform_gbm will use udev.

Signed-off-by: Chad Versace <chad.versace@linux.intel.com>
---
 CMakeLists.txt | 6 ++++++
 1 file changed, 6 insertions(+)

Patch hide | download patch | download mbox

diff --git a/CMakeLists.txt b/CMakeLists.txt
index bef9c35..73971f9 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -111,6 +111,12 @@  IF(${CMAKE_SYSTEM_NAME} MATCHES "Linux")
 		add_definitions(-DPIGLIT_HAS_GBM)
 	endif(GBM_FOUND)
 
+	pkg_check_modules(UDEV QUIET libudev)
+	if(UDEV_FOUND)
+		set(PIGLIT_HAS_UDEV True)
+		add_definitions(-DPIGLIT_HAS_UDEV)
+	endif()
+
 	pkg_check_modules(WAYLAND QUIET wayland-client wayland-egl)
 	if (WAYLAND_FOUND)
 		set(PIGLIT_HAS_WAYLAND True)