summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorVinson Lee <vlee@freedesktop.org>2017-06-28 22:14:52 -0700
committerVinson Lee <vlee@freedesktop.org>2017-06-29 15:51:08 -0700
commit27b2914a8eed15c26698bd87cb1f4ca9106dccd6 (patch)
tree954014d1c0903fdd5de404dd024d8847cc175263
parent3b9e5ba14b930fe61761d5ddbd736593ef000228 (diff)
cmake: Check for linux/sync_file.h for egl_khr_fence_sync.
Fixes: 2e423dd3f4ca ("egl_khr_fence_sync: Add sw_sync lib.") Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=101641 Signed-off-by: Vinson Lee <vlee@freedesktop.org> Reviewed-by: Brian Paul <brianp@vmware.com> Reviewed-by: Rafael Antognolli <rafael.antognolli@intel.com>
-rw-r--r--CMakeLists.txt1
-rw-r--r--tests/egl/spec/egl_khr_fence_sync/CMakeLists.gles2.txt2
2 files changed, 3 insertions, 0 deletions
diff --git a/CMakeLists.txt b/CMakeLists.txt
index 90d056b5a..a24ddbc4a 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -470,6 +470,7 @@ check_include_file(sys/resource.h HAVE_SYS_RESOURCE_H)
check_include_file(sys/stat.h HAVE_SYS_STAT_H)
check_include_file(unistd.h HAVE_UNISTD_H)
check_include_file(fcntl.h HAVE_FCNTL_H)
+check_include_file(linux/sync_file.h HAVE_LINUX_SYNC_FILE_H)
if(DEFINED PIGLIT_INSTALL_VERSION)
set(PIGLIT_INSTALL_VERSION_SUFFIX
diff --git a/tests/egl/spec/egl_khr_fence_sync/CMakeLists.gles2.txt b/tests/egl/spec/egl_khr_fence_sync/CMakeLists.gles2.txt
index c652e4c43..550d694fe 100644
--- a/tests/egl/spec/egl_khr_fence_sync/CMakeLists.gles2.txt
+++ b/tests/egl/spec/egl_khr_fence_sync/CMakeLists.gles2.txt
@@ -4,6 +4,8 @@ if(PIGLIT_HAS_PTHREADS)
link_libraries(${CMAKE_THREAD_LIBS_INIT})
endif()
+if(HAVE_LINUX_SYNC_FILE_H)
piglit_add_executable(egl_khr_fence_sync egl_khr_fence_sync.c sw_sync.c)
+endif()
# vim: ft=cmake: