diff options
author | Chad Versace <chad.versace@linux.intel.com> | 2013-09-10 11:10:42 -0500 |
---|---|---|
committer | Chad Versace <chad.versace@linux.intel.com> | 2013-10-03 13:30:33 -0700 |
commit | ad7fad694bcb943969764b29605a0c7172375264 (patch) | |
tree | 184357eb433e91e988319a46f15509dbc05bf819 /CMakeLists.txt | |
parent | dd178de4e54e6771c2dd6aaa04c397469e5950ba (diff) |
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 <ian.d.romanick@intel.com>
Signed-off-by: Chad Versace <chad.versace@linux.intel.com>
Diffstat (limited to 'CMakeLists.txt')
-rw-r--r-- | CMakeLists.txt | 7 |
1 files changed, 5 insertions, 2 deletions
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) |