From ad7fad694bcb943969764b29605a0c7172375264 Mon Sep 17 00:00:00 2001 From: Chad Versace Date: Tue, 10 Sep 2013 11:10:42 -0500 Subject: cmake,dma_buf: Require xcb-dri2 for dma_buf tests (v2) xcb-dri2 is an optional build dependency for the dma_buf tests. If xcb-dri2 is present, then the tests use it to gain DRM authentication. Otherwise, the tests must be ran as root. No one likes running tests as root, so require xcb-dri2 for these tests. v2: Fix spurious whitespace. Tested-by: Ian Romanick Signed-off-by: Chad Versace --- CMakeLists.txt | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) (limited to 'CMakeLists.txt') diff --git a/CMakeLists.txt b/CMakeLists.txt index 2aba8448a..955516b02 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -99,10 +99,12 @@ ENDIF() # Choose to build tests that use dma_buf. # +# Piglit's dma_buf utilities require xcb-dri2 to gain DRM authentication. +# # The presence of libdrm is not sufficient. At least one libdrm_${hardware} # library is also needed. # -if(LIBDRM_FOUND AND LIBDRM_INTEL_FOUND) +if(LIBDRM_FOUND AND LIBDRM_INTEL_FOUND AND XCB_DRI2_FOUND) set(PIGLIT_BUILD_DMA_BUF_TESTS_IS_VALID true) else() set(PIGLIT_BUILD_DMA_BUF_TESTS_IS_VALID false) @@ -118,7 +120,8 @@ endif() # we need to validate it. if(PIGLIT_BUILD_DMA_BUF_TESTS AND NOT PIGLIT_BUILD_DMA_BUF_TESTS_IS_VALID) message(FATAL_ERROR - "PIGLIT_BUILD_DMA_BUF_TESTS require libdrm and libdrm_intel") + "PIGLIT_BUILD_DMA_BUF_TESTS require libdrm and libdrm_intel, " + "and xcb-dri2") endif() IF(PIGLIT_BUILD_GLX_TESTS) -- cgit v1.2.3