Commit fc493b48 authored by Chad Versace's avatar Chad Versace

cmake: Prepare CMake for GL and GLES2 builds

Add two new CMakeLists, /cmake/target_api/{gl,gles2}/CMakeLists.txt, each
of which builds Piglit with its respective API. (Of course,
gles2/CMakeLists.txt adds no targets because Piglit does not yet support
building with GLES2.)

The toplevel CMakeLists no longer adds subdirectory /tests; that is now
the responsiblity of the API-specific CMakeLists.

Note: This belongs to a series that adds GLES2 support to Piglit.
Signed-off-by: default avatarChad Versace <chad.versace@intel.com>
parent c55e20f2
......@@ -26,8 +26,6 @@ find_library(OPENGL_gles2_LIBRARY NAMES GLESv2)
set(EXECUTABLE_OUTPUT_PATH ${piglit_BINARY_DIR}/bin)
set(LIBRARY_OUTPUT_PATH ${piglit_BINARY_DIR}/lib)
add_subdirectory (tests)
check_function_exists(strchrnul HAVE_STRCHRNUL)
check_function_exists(fopen_s HAVE_FOPEN_S)
......@@ -40,3 +38,5 @@ configure_file(
"${piglit_SOURCE_DIR}/tests/util/config.h.in"
"${piglit_SOURCE_DIR}/tests/util/config.h"
)
add_subdirectory(cmake/target_api)
add_subdirectory(gl)
add_subdirectory(gles2)
add_subdirectory(no_api)
set(piglit_target_api "gl")
add_definitions(
-DUSE_OPENGL
-DUSE_GLUT
)
add_subdirectory(${piglit_SOURCE_DIR}/tests
${piglit_BINARY_DIR}/target_api/${piglit_target_api}/tests
)
set(piglit_target_api "gles2")
add_definitions(
-DUSE_OPENGL_ES2
-DUSE_EGLUT
)
# Don't add any targets, because Piglit doesn't support GLES2 yet.
set(piglit_target_api "no_api")
# Don't add any targets yet.
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