aboutsummaryrefslogtreecommitdiff
path: root/CMakeLists.txt
diff options
context:
space:
mode:
authorChad Versace <chad.versace@linux.intel.com>2012-09-26 17:40:44 -0700
committerChad Versace <chad.versace@linux.intel.com>2012-10-09 19:08:31 -0700
commit4072eacd585d084d443a9643bb864160ea71494b (patch)
tree058eba4a4191015993ed62ab1720762f580bdb10 /CMakeLists.txt
parent50402d6c781fface2248fd22862d8b97f4470c14 (diff)
cmake: On Linux, require Waffle by default
The new GL test framework, piglit_wfl_framework, requires Waffle. Testers should prefer to use that over piglit_glut_framework. To quiet the angry mob, if CMake fails to find Waffle then it prints a helpful message that points to Waffle's website. Reviewed-and-tested-by: Jordan Justen <jordan.l.justen@intel.com> Tested-by: Paul Berry <stereotype441@gmail.com> Acked-by: Eric Anholt <eric@anholt.net> Signed-off-by: Chad Versace <chad.versace@linux.intel.com>
Diffstat (limited to 'CMakeLists.txt')
-rw-r--r--CMakeLists.txt15
1 files changed, 14 insertions, 1 deletions
diff --git a/CMakeLists.txt b/CMakeLists.txt
index c202af1f..fce260ca 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -21,9 +21,22 @@ 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)
-option(PIGLIT_USE_WAFFLE "Use Waffle in place of GLUT" OFF)
+if(${CMAKE_SYSTEM_NAME} MATCHES "Linux")
+ option(PIGLIT_USE_WAFFLE "Use Waffle in place of GLUT" ON)
+else()
+ option(PIGLIT_USE_WAFFLE "Use Waffle in place of GLUT" OFF)
+endif()
+
if(PIGLIT_USE_WAFFLE)
pkg_check_modules(WAFFLE REQUIRED waffle-1>=1.0.1)
+
+ if(NOT WAFFLE_FOUND)
+ message(FATAL_ERROR "Failed to find Waffle. If Waffle is not "
+ "packaged for your distribution, you can get it at "
+ "http://people.freedesktop.org/~chadversary/waffle."
+ )
+ endif()
+
add_definitions(-DPIGLIT_USE_WAFFLE)
set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} ${WAFFLE_CFLAGS}")
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} ${WAFFLE_CFLAGS}")