summaryrefslogtreecommitdiff
path: root/cmake
diff options
context:
space:
mode:
authorChad Versace <chad.versace@intel.com>2011-02-26 01:18:46 -0800
committerChad Versace <chad.versace@intel.com>2011-02-26 01:18:46 -0800
commitbeec033ef6a398fc32f46e907d34ce7c8b7b4d6f (patch)
tree8b34949586ba47cb5d9c152507fe596639b6d517 /cmake
parent6e4cb28d51d03efb4cd091d62f8cf66ef91f7484 (diff)
cmake: Do not add GLES2 targets if OPENGL_gles2_LIBRARY is not found
Signed-off-by: Chad Versace <chad.versace@intel.com>
Diffstat (limited to 'cmake')
-rw-r--r--cmake/target_api/gles2/CMakeLists.txt17
1 files changed, 10 insertions, 7 deletions
diff --git a/cmake/target_api/gles2/CMakeLists.txt b/cmake/target_api/gles2/CMakeLists.txt
index 9857838ce..091dcf239 100644
--- a/cmake/target_api/gles2/CMakeLists.txt
+++ b/cmake/target_api/gles2/CMakeLists.txt
@@ -1,8 +1,11 @@
set(piglit_target_api "gles2")
-add_definitions(
- -DUSE_OPENGL_ES2
- -DUSE_EGLUT
- )
-add_subdirectory(${piglit_SOURCE_DIR}/tests
- ${piglit_BINARY_DIR}/target_api/${piglit_target_api}/tests
- )
+
+if(OPENGL_gles2_LIBRARY AND OPENGL_egl_LIBRARY)
+ add_definitions(
+ -DUSE_OPENGL_ES2
+ -DUSE_EGLUT
+ )
+ add_subdirectory(${piglit_SOURCE_DIR}/tests
+ ${piglit_BINARY_DIR}/target_api/${piglit_target_api}/tests
+ )
+endif(OPENGL_gles2_LIBRARY AND OPENGL_egl_LIBRARY)