summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorChad Versace <chad.versace@intel.com>2011-02-23 16:56:10 -0800
committerChad Versace <chad.versace@intel.com>2011-02-25 20:44:11 -0800
commitf232590b668fd2217a5774d5e7903cc1ba984aeb (patch)
treea0897c5ca0c43d7812d5abe7198bb8508410604f
parent6c1e6f71cac85f301eee63485266c5757541292d (diff)
cmake: Enable building GLES2 targets
Signed-off-by: Chad Versace <chad.versace@intel.com>
-rw-r--r--CMakeLists.txt1
-rw-r--r--cmake/target_api/gles2/CMakeLists.txt5
-rw-r--r--cmake/target_api/no_api/CMakeLists.txt9
3 files changed, 11 insertions, 4 deletions
diff --git a/CMakeLists.txt b/CMakeLists.txt
index 2e259bce6..af6b0b1ba 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -11,6 +11,7 @@ find_package(TIFF REQUIRED)
find_package(GLUT REQUIRED)
find_package(PNG REQUIRED)
find_package(X11)
+find_library(OPENGL_gles2_LIBRARY NAMES GLESv2)
CHECK_C_COMPILER_FLAG("-Wall" C_COMPILER_FLAG_WALL)
IF (C_COMPILER_FLAG_WALL)
diff --git a/cmake/target_api/gles2/CMakeLists.txt b/cmake/target_api/gles2/CMakeLists.txt
index d92d41059..9857838ce 100644
--- a/cmake/target_api/gles2/CMakeLists.txt
+++ b/cmake/target_api/gles2/CMakeLists.txt
@@ -3,5 +3,6 @@ add_definitions(
-DUSE_OPENGL_ES2
-DUSE_EGLUT
)
-
-# Don't add any targets, because Piglit doesn't support GLES2 yet.
+add_subdirectory(${piglit_SOURCE_DIR}/tests
+ ${piglit_BINARY_DIR}/target_api/${piglit_target_api}/tests
+ )
diff --git a/cmake/target_api/no_api/CMakeLists.txt b/cmake/target_api/no_api/CMakeLists.txt
index 08d7e8b63..5c00744fe 100644
--- a/cmake/target_api/no_api/CMakeLists.txt
+++ b/cmake/target_api/no_api/CMakeLists.txt
@@ -1,3 +1,8 @@
-set(piglit_target_api "no_api")
+# "Think of no API. no_api... what kind of API is that? NonAPI. This is the
+# essential art of CMake-zen."
+# -- Eihei Dogen. "Fukan Zazengi". circa 1228 CE.
-# Don't add any targets yet.
+set(piglit_target_api "no_api")
+add_subdirectory(${piglit_SOURCE_DIR}/tests
+ ${piglit_BINARY_DIR}/target_api/${piglit_target_api}/tests
+ )