Commit bd8d4d23 authored by Chad Versace's avatar Chad Versace

cmake: Use glut_waffle if USE_WAFFLE is enabled

For GL tests (those built by CMakeLists.gl.txt), if USE_WAFFLE is enabled
then freeglut is replaced with glut_waffle.

For GLES1 and GLES2 tests, glut_waffle is now required.
Reviewed-by: default avatarPauli Nieminen <pauli.nieminen@intel.com>
Reviewed-by: Jordan Justen's avatarJordan Justen <jordan.l.justen@intel.com>
Reviewed-by: Anuj Phogat's avatarAnuj Phogat <anuj.phogat@gmail.com>
Signed-off-by: default avatarChad Versace <chad.versace@linux.intel.com>
parent e6d4a084
# Copyright (c) 2010 Intel Corporation
# Copyright (c) 2010-2012 Intel Corporation
#
# Permission is hereby granted, free of charge, to any person obtaining a
# copy of this software and associated documentation files (the "Software"),
......@@ -18,9 +18,10 @@
# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
# FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS
# IN THE SOFTWARE.
#
# Authors:
# Chad Versace <chad.versace@intel.com>
# The no_api directory must precede the GL directories because it builds
# glut_waffle, which the GL targets depend on.
add_subdirectory(no_api)
add_subdirectory(gl)
......@@ -31,5 +32,3 @@ endif(BUILD_GLES1_TESTS)
if(BUILD_GLES2_TESTS)
add_subdirectory(gles2)
endif(BUILD_GLES2_TESTS)
add_subdirectory(no_api)
set(piglit_target_api "gl")
add_definitions(
-DUSE_OPENGL
-DUSE_GLUT
)
include_directories(
${GLUT_INCLUDE_DIR}
)
link_libraries(
${GLUT_glut_LIBRARY}
)
if(USE_WAFFLE)
link_libraries(glut_waffle)
else(USE_WAFFLE)
add_definitions(-DUSE_GLUT)
include_directories(
${GLUT_INCLUDE_DIR}
)
link_libraries(
${GLUT_glut_LIBRARY}
)
endif(USE_WAFFLE)
add_subdirectory(${piglit_SOURCE_DIR}/tests
${piglit_BINARY_DIR}/target_api/${piglit_target_api}/tests
)
......@@ -2,8 +2,8 @@ set(piglit_target_api "gles1")
add_definitions(
-DUSE_OPENGL_ES1
-DUSE_EGLUT
)
link_libraries(glut_waffle)
add_subdirectory(${piglit_SOURCE_DIR}/tests
${piglit_BINARY_DIR}/target_api/${piglit_target_api}/tests
)
......@@ -2,8 +2,8 @@ set(piglit_target_api "gles2")
add_definitions(
-DUSE_OPENGL_ES2
-DUSE_EGLUT
)
link_libraries(glut_waffle)
add_subdirectory(${piglit_SOURCE_DIR}/tests
${piglit_BINARY_DIR}/target_api/${piglit_target_api}/tests
)
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