Add "gles3" as a new api in PIGLIT_TOP/cmake/target_api. Now, you can build GLES3 tests and libraries by placing the build rules in files named CMakeLists.gles3.txt.
I dislike the CMake hackery of havining multiple builds for each target api. But, because GLES2 and GLES3 use different headers (gl2.h vs gl3.h), until piglit-dispatch gains support for GLES the most sensible way to add GLES3 support to piglit is to continue the tradition of adding a new target api into PIGLIT_TOP/cmake/target_api. Signed-off-by: Chad Versace <[email protected]> --- cmake/piglit_util.cmake | 2 +- cmake/target_api/CMakeLists.txt | 4 ++++ cmake/target_api/gles3/CMakeLists.txt | 8 ++++++++ 3 files changed, 13 insertions(+), 1 deletion(-) create mode 100644 cmake/target_api/gles3/CMakeLists.txt diff --git a/cmake/piglit_util.cmake b/cmake/piglit_util.cmake index 681ce90..382485b 100644 --- a/cmake/piglit_util.cmake +++ b/cmake/piglit_util.cmake @@ -29,7 +29,7 @@ function(piglit_include_target_api) # Verify that the value of `piglit_target_api` is valid. set(valid_api FALSE) - foreach(api "gl" "gles1" "gles2" "cl" "no_api") + foreach(api "gl" "gles1" "gles2" "gles3" "cl" "no_api") if(piglit_target_api STREQUAL ${api}) set(valid_api TRUE) break() diff --git a/cmake/target_api/CMakeLists.txt b/cmake/target_api/CMakeLists.txt index e81c0b5..3a0b67f 100644 --- a/cmake/target_api/CMakeLists.txt +++ b/cmake/target_api/CMakeLists.txt @@ -35,6 +35,10 @@ if(PIGLIT_BUILD_GLES2_TESTS) add_subdirectory(gles2) endif(PIGLIT_BUILD_GLES2_TESTS) +if(PIGLIT_BUILD_GLES3_TESTS) + add_subdirectory(gles3) +endif(PIGLIT_BUILD_GLES3_TESTS) + if(PIGLIT_BUILD_CL_TESTS) add_subdirectory(cl) endif(PIGLIT_BUILD_CL_TESTS) diff --git a/cmake/target_api/gles3/CMakeLists.txt b/cmake/target_api/gles3/CMakeLists.txt new file mode 100644 index 0000000..55b677d --- /dev/null +++ b/cmake/target_api/gles3/CMakeLists.txt @@ -0,0 +1,8 @@ +set(piglit_target_api "gles3") + +add_definitions( + -DPIGLIT_USE_OPENGL_ES3 + ) +add_subdirectory(${piglit_SOURCE_DIR}/tests + ${piglit_BINARY_DIR}/target_api/${piglit_target_api}/tests + ) -- 1.7.11.7 _______________________________________________ Piglit mailing list [email protected] http://lists.freedesktop.org/mailman/listinfo/piglit
