Commit 36872a46 authored by Chia-I Wu's avatar Chia-I Wu Committed by Paul Berry

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>
parent be0e2a31
......@@ -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
......
......@@ -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)
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)
......@@ -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)
......
#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:
piglit_include_target_api()
......@@ -7,6 +7,7 @@ include_directories(
set(UTIL_SOURCES
${UTIL_SOURCES}
glew.c
piglit-shader.c
piglit-shader-gl.c
piglit-util-gl.c
)
......
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:
set(UTIL_SOURCES
${UTIL_SOURCES}
piglit-shader.c
piglit-shader-gles2.c
piglit-util-gles.c
)
......
......@@ -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
......
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