diff options
author | Chad Versace <chad.versace@linux.intel.com> | 2012-11-27 13:13:36 -0800 |
---|---|---|
committer | Chad Versace <chad.versace@linux.intel.com> | 2012-11-29 17:08:01 -0800 |
commit | 2f1429499d4e09eafc67b72395302abde5c9bfe9 (patch) | |
tree | a888a99791cc16b576316b276edc6569b07ef099 /cmake | |
parent | 17628fada233f8c658f3331b34b9fa6aa8851b26 (diff) |
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: Chad Versace <chad.versace@linux.intel.com>
Reviewed-by: Eric Anholt <eric@anholt.net>
Diffstat (limited to 'cmake')
-rw-r--r-- | cmake/piglit_util.cmake | 2 | ||||
-rw-r--r-- | cmake/target_api/CMakeLists.txt | 4 | ||||
-rw-r--r-- | cmake/target_api/gles3/CMakeLists.txt | 8 |
3 files changed, 13 insertions, 1 deletions
diff --git a/cmake/piglit_util.cmake b/cmake/piglit_util.cmake index 681ce90b5..382485bff 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 e81c0b538..3a0b67f6b 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 000000000..55b677d5e --- /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 + ) |