aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--CMakeLists.txt6
-rw-r--r--src/glut_waffle/CMakeLists.no_api.txt3
-rw-r--r--src/glut_waffle/glut_waffle.c2
-rw-r--r--tests/util/CMakeLists.txt8
-rw-r--r--tests/util/piglit-framework-fbo.c2
5 files changed, 7 insertions, 14 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)
diff --git a/src/glut_waffle/CMakeLists.no_api.txt b/src/glut_waffle/CMakeLists.no_api.txt
index b49965a9..70bd193f 100644
--- a/src/glut_waffle/CMakeLists.no_api.txt
+++ b/src/glut_waffle/CMakeLists.no_api.txt
@@ -1,5 +1,4 @@
-include_directories(${WAFFLE_INCLUDE_DIR})
-link_libraries(${WAFFLE_waffle_LIBRARY})
+link_libraries(${WAFFLE_LIBRARIES})
add_library(glut_waffle SHARED
glut_waffle.c
diff --git a/src/glut_waffle/glut_waffle.c b/src/glut_waffle/glut_waffle.c
index 03590749..83281fd8 100644
--- a/src/glut_waffle/glut_waffle.c
+++ b/src/glut_waffle/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;
diff --git a/tests/util/CMakeLists.txt b/tests/util/CMakeLists.txt
index ca9d7e4b..b60683ab 100644
--- a/tests/util/CMakeLists.txt
+++ b/tests/util/CMakeLists.txt
@@ -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()
diff --git a/tests/util/piglit-framework-fbo.c b/tests/util/piglit-framework-fbo.c
index 41333848..6fda821d 100644
--- a/tests/util/piglit-framework-fbo.c
+++ b/tests/util/piglit-framework-fbo.c
@@ -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