diff options
author | Chia-I Wu <olvaffe@gmail.com> | 2011-09-05 10:45:01 +0800 |
---|---|---|
committer | Paul Berry <stereotype441@gmail.com> | 2011-09-09 11:28:19 -0700 |
commit | 36872a46ae86bcc0ad29d1f90b368b564bc2b3e5 (patch) | |
tree | dd344f879d454485305ea57e77d7f653daf4e608 | |
parent | be0e2a318bddabfce5e1b1699f36ac3811086556 (diff) |
cmake: add gles1 as a valid target API
This commit adds the infrastructure for writing GLES1 specific tests.
Reviewed-by: Ian Romanick <ian.d.romanick at intel.com>
-rw-r--r-- | CMakeLists.txt | 1 | ||||
-rw-r--r-- | cmake/target_api/CMakeLists.txt | 3 | ||||
-rw-r--r-- | cmake/target_api/gles1/CMakeLists.txt | 11 | ||||
-rw-r--r-- | tests/CMakeLists.txt | 1 | ||||
-rw-r--r-- | tests/gles1/CMakeLists.gles1.txt | 15 | ||||
-rw-r--r-- | tests/gles1/CMakeLists.txt | 1 | ||||
-rw-r--r-- | tests/util/CMakeLists.gl.txt | 1 | ||||
-rw-r--r-- | tests/util/CMakeLists.gles1.txt | 20 | ||||
-rw-r--r-- | tests/util/CMakeLists.gles2.txt | 1 | ||||
-rw-r--r-- | tests/util/CMakeLists.txt | 1 |
10 files changed, 53 insertions, 2 deletions
diff --git a/CMakeLists.txt b/CMakeLists.txt index f3f21f2ff..ae2ca08e9 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -84,6 +84,7 @@ FIND_LIBRARY(OPENGL_egl_LIBRARY NAMES EGL PATHS /usr/lib ) +find_library(OPENGL_gles1_LIBRARY NAMES GLESv1_CM) find_library(OPENGL_gles2_LIBRARY NAMES GLESv2) # Put all executables into the bin subdirectory diff --git a/cmake/target_api/CMakeLists.txt b/cmake/target_api/CMakeLists.txt index ea9adf511..eecbd3516 100644 --- a/cmake/target_api/CMakeLists.txt +++ b/cmake/target_api/CMakeLists.txt @@ -30,7 +30,7 @@ # function(piglit_include_target_api) set(valid_api FALSE) - foreach(api "gl" "gles2" "no_api") + foreach(api "gl" "gles1" "gles2" "no_api") if(piglit_target_api STREQUAL ${api}) set(valid_api TRUE) break() @@ -46,5 +46,6 @@ function(piglit_include_target_api) endfunction(piglit_include_target_api) add_subdirectory(gl) +add_subdirectory(gles1) add_subdirectory(gles2) add_subdirectory(no_api) diff --git a/cmake/target_api/gles1/CMakeLists.txt b/cmake/target_api/gles1/CMakeLists.txt new file mode 100644 index 000000000..ed50d1c70 --- /dev/null +++ b/cmake/target_api/gles1/CMakeLists.txt @@ -0,0 +1,11 @@ +set(piglit_target_api "gles1") + +if(OPENGL_gles1_LIBRARY AND OPENGL_egl_LIBRARY) + add_definitions( + -DUSE_OPENGL_ES1 + -DUSE_EGLUT + ) + add_subdirectory(${piglit_SOURCE_DIR}/tests + ${piglit_BINARY_DIR}/target_api/${piglit_target_api}/tests + ) +endif(OPENGL_gles1_LIBRARY AND OPENGL_egl_LIBRARY) diff --git a/tests/CMakeLists.txt b/tests/CMakeLists.txt index 52d16d4a9..7a5b8c47b 100644 --- a/tests/CMakeLists.txt +++ b/tests/CMakeLists.txt @@ -2,6 +2,7 @@ add_subdirectory (util) add_subdirectory (bugs) add_subdirectory (fbo) add_subdirectory (general) +add_subdirectory (gles1) add_subdirectory (gles2) add_subdirectory (glx) add_subdirectory (glslparsertest) diff --git a/tests/gles1/CMakeLists.gles1.txt b/tests/gles1/CMakeLists.gles1.txt new file mode 100644 index 000000000..e78b4874a --- /dev/null +++ b/tests/gles1/CMakeLists.gles1.txt @@ -0,0 +1,15 @@ +#add_definitions(-DSOURCE_DIR="${piglit_SOURCE_DIR}/") + +include_directories( + ${OPENGL_INCLUDE_PATH} + ${piglit_SOURCE_DIR}/tests/util/ + ) + +link_libraries( + ${OPENGL_gles1_LIBRARY} + ${OPENGL_egl_LIBRARY} + glut_egl + piglitutil_gles1 + ) + +# vim: ft=cmake: diff --git a/tests/gles1/CMakeLists.txt b/tests/gles1/CMakeLists.txt new file mode 100644 index 000000000..144a306f4 --- /dev/null +++ b/tests/gles1/CMakeLists.txt @@ -0,0 +1 @@ +piglit_include_target_api() diff --git a/tests/util/CMakeLists.gl.txt b/tests/util/CMakeLists.gl.txt index 5b5277689..a03b50b18 100644 --- a/tests/util/CMakeLists.gl.txt +++ b/tests/util/CMakeLists.gl.txt @@ -7,6 +7,7 @@ include_directories( set(UTIL_SOURCES ${UTIL_SOURCES} glew.c + piglit-shader.c piglit-shader-gl.c piglit-util-gl.c ) diff --git a/tests/util/CMakeLists.gles1.txt b/tests/util/CMakeLists.gles1.txt new file mode 100644 index 000000000..e4bbb3311 --- /dev/null +++ b/tests/util/CMakeLists.gles1.txt @@ -0,0 +1,20 @@ +set(UTIL_SOURCES + ${UTIL_SOURCES} + piglit-util-gles.c + ) + +link_libraries( + ${OPENGL_gles1_LIBRARY} + piglitutil_${piglit_target_api} + glut_egl + ) + +add_library(piglitutil_${piglit_target_api} + ${UTIL_SOURCES} +) + +if(UNIX) + target_link_libraries(piglitutil_${piglit_target_api} m) +endif(UNIX) + +# vim: ft=cmake: diff --git a/tests/util/CMakeLists.gles2.txt b/tests/util/CMakeLists.gles2.txt index e3de35f66..65d55a6d7 100644 --- a/tests/util/CMakeLists.gles2.txt +++ b/tests/util/CMakeLists.gles2.txt @@ -1,5 +1,6 @@ set(UTIL_SOURCES ${UTIL_SOURCES} + piglit-shader.c piglit-shader-gles2.c piglit-util-gles.c ) diff --git a/tests/util/CMakeLists.txt b/tests/util/CMakeLists.txt index 5da4cd991..3daccea1c 100644 --- a/tests/util/CMakeLists.txt +++ b/tests/util/CMakeLists.txt @@ -12,7 +12,6 @@ endif(${CMAKE_SYSTEM_NAME} MATCHES "Linux") set(UTIL_SOURCES fdo-bitmap.c piglit-util.c - piglit-shader.c shader-load.c piglit-framework.c rgb9e5.c |