Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJason Wilkins <Jason.A.Wilkins@gmail.com>2014-06-12 05:26:22 +0400
committerJason Wilkins <Jason.A.Wilkins@gmail.com>2014-06-12 05:26:22 +0400
commita8dee3a614692b7e4f4a897cc32f85a19c965dff (patch)
tree6611096b3938d1ac6871290a98e6b7efa7a5f63a /build_files/cmake
parent6da8fa60f58b458bca12e8655cea11c148e4fc2f (diff)
GHOST Refactor for EGL Contexts
Documentation to appear here: http://wiki.blender.org/index.php/User:Jwilkins/VFX/GHOST_Refactor_for_EGL Missing from this commit is support for systems other than Windows. This also only builds with CMake.
Diffstat (limited to 'build_files/cmake')
-rw-r--r--build_files/cmake/Modules/FindOpenGLES.cmake51
-rw-r--r--build_files/cmake/macros.cmake14
2 files changed, 59 insertions, 6 deletions
diff --git a/build_files/cmake/Modules/FindOpenGLES.cmake b/build_files/cmake/Modules/FindOpenGLES.cmake
new file mode 100644
index 00000000000..981a1abb0a9
--- /dev/null
+++ b/build_files/cmake/Modules/FindOpenGLES.cmake
@@ -0,0 +1,51 @@
+# - Try to find OpenGLES
+# Once done this will define
+#
+# OPENGLES_FOUND - system has OpenGLES and EGL
+# OPENGL_EGL_FOUND - system has EGL
+# OPENGLES_INCLUDE_DIR - the GLES include directory
+# OPENGLES_LIBRARY - the GLES library
+# OPENGLES_EGL_INCLUDE_DIR - the EGL include directory
+# OPENGLES_EGL_LIBRARY - the EGL library
+# OPENGLES_LIBRARIES - all libraries needed for OpenGLES
+# OPENGLES_INCLUDES - all includes needed for OpenGLES
+
+FIND_PATH(OPENGLES_INCLUDE_DIR GLES2/gl2.h
+ /usr/openwin/share/include
+ /opt/graphics/OpenGL/include /usr/X11R6/include
+ /usr/include
+)
+
+FIND_LIBRARY(OPENGLES_LIBRARY
+ NAMES GLESv2
+ PATHS /opt/graphics/OpenGL/lib
+ /usr/openwin/lib
+ /usr/shlib /usr/X11R6/lib
+ /usr/lib
+)
+
+FIND_PATH(OPENGLES_EGL_INCLUDE_DIR EGL/egl.h
+ /usr/openwin/share/include
+ /opt/graphics/OpenGL/include /usr/X11R6/include
+ /usr/include
+)
+
+FIND_LIBRARY(OPENGLES_EGL_LIBRARY
+ NAMES EGL
+ PATHS /usr/shlib /usr/X11R6/lib
+ /usr/lib
+)
+
+SET(OPENGL_EGL_FOUND "NO")
+IF(OPENGLES_EGL_LIBRARY AND OPENGLES_EGL_INCLUDE_DIR)
+ SET(OPENGL_EGL_FOUND "YES")
+ENDIF()
+
+SET(OPENGLES_FOUND "NO")
+IF(OPENGLES_LIBRARY AND OPENGLES_INCLUDE_DIR AND
+ OPENGLES_EGL_LIBRARY AND OPENGLES_EGL_INCLUDE_DIR)
+ SET(OPENGLES_LIBRARIES ${OPENGLES_LIBRARY} ${OPENGLES_LIBRARIES}
+ ${OPENGLES_EGL_LIBRARY})
+ SET(OPENGLES_INCLUDES ${OPENGLES_INCLUDE_DIR} ${OPENGLES_EGL_INCLUDE_DIR})
+ SET(OPENGLES_FOUND "YES")
+ENDIF()
diff --git a/build_files/cmake/macros.cmake b/build_files/cmake/macros.cmake
index 772ff6d7596..80a4858bf94 100644
--- a/build_files/cmake/macros.cmake
+++ b/build_files/cmake/macros.cmake
@@ -284,8 +284,7 @@ macro(setup_liblinks
set(CMAKE_EXE_LINKER_FLAGS_DEBUG "${CMAKE_EXE_LINKER_FLAGS_DEBUG} ${PLATFORM_LINKFLAGS_DEBUG}")
target_link_libraries(${target}
- ${OPENGL_gl_LIBRARY}
- ${OPENGL_glu_LIBRARY}
+ ${BLENDER_GL_LIBRARIES}
${PNG_LIBRARIES}
${ZLIB_LIBRARIES}
${FREETYPE_LIBRARY})
@@ -305,7 +304,7 @@ macro(setup_liblinks
endif()
if(WITH_SYSTEM_GLEW)
- target_link_libraries(${target} ${GLEW_LIBRARY})
+ target_link_libraries(${target} ${BLENDER_GLEW_LIBRARIES})
endif()
if(WITH_BULLET AND WITH_SYSTEM_BULLET)
target_link_libraries(${target} ${BULLET_LIBRARIES})
@@ -359,9 +358,12 @@ macro(setup_liblinks
endif()
if(WITH_CODEC_FFMPEG)
- # Strange!, without this ffmpeg gives linking errors (on linux)
- # even though its linked above
- target_link_libraries(${target} ${OPENGL_glu_LIBRARY})
+ # Strange! Without this ffmpeg gives linking errors (on linux),
+ # even though it's linked above.
+ # XXX: Does FFMPEG depend on GLU?
+ if(WITH_GLU)
+ target_link_libraries(${target} ${OPENGL_glu_LIBRARY})
+ endif()
target_link_libraries(${target} ${FFMPEG_LIBRARIES})
endif()