diff options
author | Chad Versace <chad.versace@linux.intel.com> | 2012-05-18 14:00:17 -0700 |
---|---|---|
committer | Chad Versace <chad.versace@linux.intel.com> | 2012-05-23 21:57:10 -0700 |
commit | bd8d4d2342b6bfce7af1b8c6dbc33c6096d689e7 (patch) | |
tree | fe38022dc8453517f9bf6ff1afff501aae538f90 /cmake | |
parent | e6d4a0844f081a711d99e3fcafdd6712c646cdd9 (diff) |
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: Pauli Nieminen <pauli.nieminen@intel.com>
Reviewed-by: Jordan Justen <jordan.l.justen@intel.com>
Reviewed-by: Anuj Phogat <anuj.phogat@gmail.com>
Signed-off-by: Chad Versace <chad.versace@linux.intel.com>
Diffstat (limited to 'cmake')
-rw-r--r-- | cmake/target_api/CMakeLists.txt | 11 | ||||
-rw-r--r-- | cmake/target_api/gl/CMakeLists.txt | 20 | ||||
-rw-r--r-- | cmake/target_api/gles1/CMakeLists.txt | 2 | ||||
-rw-r--r-- | cmake/target_api/gles2/CMakeLists.txt | 2 |
4 files changed, 20 insertions, 15 deletions
diff --git a/cmake/target_api/CMakeLists.txt b/cmake/target_api/CMakeLists.txt index 57b28c730..f152ba206 100644 --- a/cmake/target_api/CMakeLists.txt +++ b/cmake/target_api/CMakeLists.txt @@ -1,4 +1,4 @@ -# 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) diff --git a/cmake/target_api/gl/CMakeLists.txt b/cmake/target_api/gl/CMakeLists.txt index 47adb91f7..ae67020d3 100644 --- a/cmake/target_api/gl/CMakeLists.txt +++ b/cmake/target_api/gl/CMakeLists.txt @@ -1,14 +1,20 @@ 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 ) diff --git a/cmake/target_api/gles1/CMakeLists.txt b/cmake/target_api/gles1/CMakeLists.txt index bbd7fa863..02ca906ad 100644 --- a/cmake/target_api/gles1/CMakeLists.txt +++ b/cmake/target_api/gles1/CMakeLists.txt @@ -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 ) diff --git a/cmake/target_api/gles2/CMakeLists.txt b/cmake/target_api/gles2/CMakeLists.txt index 378e074a1..4dcfd175c 100644 --- a/cmake/target_api/gles2/CMakeLists.txt +++ b/cmake/target_api/gles2/CMakeLists.txt @@ -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 ) |