Commit a408cfab authored by Chad Versace's avatar Chad Versace

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: default avatarChad Versace <chad@chad.versace.us>
parent 060d3587
......@@ -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)
......
include_directories(${WAFFLE_INCLUDE_DIR})
link_libraries(${WAFFLE_waffle_LIBRARY})
link_libraries(${WAFFLE_LIBRARIES})
add_library(glut_waffle SHARED
glut_waffle.c
......
......@@ -32,7 +32,7 @@
#include <unistd.h>
#include <EGL/egl.h>
#include <waffle/waffle.h>
#include <waffle.h>
extern int piglit_automatic;
......
......@@ -28,6 +28,7 @@ set(UTIL_GL_SOURCES
set(UTIL_GL_LIBS
piglitutil
${WAFFLE_LIBRARIES}
)
if(${CMAKE_SYSTEM_NAME} MATCHES "Linux")
......@@ -48,11 +49,4 @@ if(OPENGL_egl_LIBRARY)
)
endif(OPENGL_egl_LIBRARY)
if(USE_WAFFLE)
set(UTIL_GL_LIBS
${UTIL_GL_LIBS}
"${WAFFLE_waffle_LIBRARY}"
)
endif(USE_WAFFLE)
piglit_include_target_api()
......@@ -50,7 +50,7 @@
#endif
#ifdef PIGLIT_FRAMEWORK_FBO_USE_WAFFLE
#include <waffle/waffle.h>
#include <waffle.h>
#endif
#ifdef PIGLIT_FRAMEWORK_FBO_USE_GLX
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment