Permalink
Browse files

Add EGL && GLESv1 cmake files for future

  • Loading branch information...
1 parent b26b98c commit 1e7d73fc4a0ce0a11dddc21d25a870c9b8eb66e8 @Cloudef committed Aug 2, 2012
Showing with 32 additions and 1 deletion.
  1. +16 −0 CMake/modules/FindEGL.cmake
  2. +15 −0 CMake/modules/FindGLESv1.cmake
  3. +1 −1 CMakeLists.txt
@@ -0,0 +1,16 @@
+# Find EGL
+#
+# EGL_INCLUDE_DIR
+# EGL_LIBRARY
+# EGL_FOUND
+
+find_path(EGL_INCLUDE_DIR NAMES EGL/egl.h)
+
+set(EGL_NAMES ${EGL_NAMES} egl EGL)
+find_library(EGL_LIBRARY NAMES ${EGL_NAMES})
+
+include(FindPackageHandleStandardArgs)
+find_package_handle_standard_args(EGL DEFAULT_MSG EGL_LIBRARY EGL_INCLUDE_DIR)
+
+mark_as_advanced(EGL_INCLUDE_DIR EGL_LIBRARY)
+
@@ -0,0 +1,15 @@
+# Find GLESv1
+#
+# GLESv1_INCLUDE_DIR
+# GLESv1_LIBRARY
+# GLESv1_FOUND
+
+find_path(GLESv1_INCLUDE_DIR NAMES GLES/gl.h)
+
+set(GLESv1_NAMES ${GLESv1_NAMES} GLES GLESv1 GLESv1_CM)
+find_library(GLESv1_LIBRARY NAMES ${GLESv1_NAMES})
+
+include(FindPackageHandleStandardArgs)
+find_package_handle_standard_args(GLESv1 DEFAULT_MSG GLESv1_LIBRARY GLESv1_INCLUDE_DIR)
+
+mark_as_advanced(GLESv1_INCLUDE_DIR GLESv1_LIBRARY)
View
@@ -83,7 +83,7 @@ ENDIF ()
IF (GLHCK_USE_GLES)
# GLES
- SET(CMAKE_MODULE_PATH ${CMAKE_BINARY_DIR}/CMake/modules)
+ SET(CMAKE_MODULE_PATH ${CMAKE_SOURCE_DIR}/CMake/modules)
ADD_DEFINITIONS(-DGLES)
FIND_PACKAGE(EGL REQUIRED)
LIST(APPEND INCLUDE_DIR ${EGL_INCLUDE_DIR})

0 comments on commit 1e7d73f

Please sign in to comment.