aboutsummaryrefslogtreecommitdiff
path: root/CMakeLists.txt
diff options
context:
space:
mode:
authorChad Versace <chad@chad.versace.us>2012-08-23 13:53:17 -0700
committerChad Versace <chad@chad.versace.us>2012-08-23 16:12:55 -0700
commita408cfabd5b98ef72e15e1ae62b0e484499411af (patch)
tree8cb45aa0eb628b7fb6fec02b17ddea4c17718c39 /CMakeLists.txt
parent060d3587db7da69cbb5cf8d635a62fd3d3555edd (diff)
downloadpiglit-a408cfabd5b98ef72e15e1ae62b0e484499411af.tar.gz
cmake,waffle: Bump requirement to waffle>=1.0
If piglit is configured to use waffle, then use pkgconfig to require waffle>=1.0. Also, replace the custom cmake WAFFLE variables with those provided by the pkg_check_modules. Waffle 1.0 moved its header directory from $prefix/include/waffle to $prefix/include/waffle-1. So add '-I $prefix/include/waffle-1' to the CFLAGS and update the #include directives appropriately. Signed-off-by: Chad Versace <chad@chad.versace.us>
Diffstat (limited to 'CMakeLists.txt')
-rw-r--r--CMakeLists.txt6
1 files changed, 3 insertions, 3 deletions
diff --git a/CMakeLists.txt b/CMakeLists.txt
index b2de6a9f..893a14d5 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -22,10 +22,10 @@ option(BUILD_GLES2_TESTS "Build tests for OpenGL ES2" OFF)
option(USE_WAFFLE "Use Waffle in place of GLUT" OFF)
if(USE_WAFFLE)
- # FIXME: Specify version requirements for Waffle.
- find_package(Waffle REQUIRED)
+ pkg_check_modules(WAFFLE REQUIRED waffle-1>=1.0)
add_definitions(-DUSE_WAFFLE)
- include_directories("${WAFFLE_INCLUDE_DIR}")
+ set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} ${WAFFLE_CFLAGS}")
+ set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} ${WAFFLE_CFLAGS}")
endif(USE_WAFFLE)
if(BUILD_GLES1_TESTS AND NOT USE_WAFFLE)