aboutsummaryrefslogtreecommitdiff
path: root/CMakeLists.txt
diff options
context:
space:
mode:
authorAdrian Marius Negreanu <adrian.m.negreanu@intel.com>2012-10-18 20:37:28 +0300
committerChad Versace <chad.versace@linux.intel.com>2012-10-22 13:53:23 -0700
commit215411e056cc238876f51f4d47eb9bfb6f089fe5 (patch)
tree42ac277d0b0e0fedefcea7b1cf5f7d587faa9fc3 /CMakeLists.txt
parentb3e3b82f65b5aefede8baf1287bdac135ad97e7b (diff)
downloadpiglit-215411e056cc238876f51f4d47eb9bfb6f089fe5.tar.gz
cmake: Add a PIGLIT_BUILD_GL_TESTS option
The GL tests were compiled unconditionally. This breaks on systems that dont't have a GL library. Signed-off-by: Adrian Marius Negreanu <adrian.m.negreanu@intel.com> Reviewed-by: Chad Versace <chad.versace@linux.intel.com>
Diffstat (limited to 'CMakeLists.txt')
-rw-r--r--CMakeLists.txt8
1 files changed, 7 insertions, 1 deletions
diff --git a/CMakeLists.txt b/CMakeLists.txt
index 51db413d..2f4c2132 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -10,17 +10,23 @@ INCLUDE (FindPkgConfig)
project (piglit)
-find_package(OpenGL REQUIRED)
find_package(TIFF)
find_package(GLUT REQUIRED)
find_package(PNG REQUIRED)
find_package(X11)
+option(PIGLIT_BUILD_GL_TESTS "Build tests for OpenGL" ON)
option(PIGLIT_BUILD_GLES1_TESTS "Build tests for OpenGL ES1" OFF)
option(PIGLIT_BUILD_GLES2_TESTS "Build tests for OpenGL ES2" OFF)
option(PIGLIT_BUILD_CL_TESTS "Build tests for OpenCL" OFF)
+if(PIGLIT_BUILD_GL_TESTS)
+ find_package(OpenGL REQUIRED)
+else()
+ find_package(OpenGL)
+endif()
+
if(${CMAKE_SYSTEM_NAME} MATCHES "Linux")
option(PIGLIT_USE_WAFFLE "Use Waffle in place of GLUT" ON)
else()