Commit 2f142949 authored by Chad Versace's avatar Chad Versace

cmake: Support CMakeLists.gles3.txt

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: default avatarChad Versace <chad.versace@linux.intel.com>
Reviewed-by: Eric Anholt's avatarEric Anholt <eric@anholt.net>
parent 17628fad
......@@ -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()
......
......@@ -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)
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
)
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