Changeset View
Changeset View
Standalone View
Standalone View
CMakeLists.txt
| Show First 20 Lines • Show All 972 Lines • ▼ Show 20 Lines | if(WITH_GL_PROFILE_ES20) | ||||
| if(WITH_SYSTEM_GLES) | if(WITH_SYSTEM_GLES) | ||||
| if(NOT OPENGLES_LIBRARY) | if(NOT OPENGLES_LIBRARY) | ||||
| message(FATAL_ERROR | message(FATAL_ERROR | ||||
| "Unable to find OpenGL ES libraries. " | "Unable to find OpenGL ES libraries. " | ||||
| "Install them or disable WITH_SYSTEM_GLES." | "Install them or disable WITH_SYSTEM_GLES." | ||||
| ) | ) | ||||
| endif() | endif() | ||||
| list(APPEND BLENDER_GL_LIBRARIES OPENGLES_LIBRARY) | list(APPEND BLENDER_GL_LIBRARIES "${OPENGLES_LIBRARY}") | ||||
| else() | else() | ||||
| set(OPENGLES_LIBRARY "" CACHE FILEPATH "OpenGL ES 2.0 library file") | set(OPENGLES_LIBRARY "" CACHE FILEPATH "OpenGL ES 2.0 library file") | ||||
| mark_as_advanced(OPENGLES_LIBRARY) | mark_as_advanced(OPENGLES_LIBRARY) | ||||
| list(APPEND BLENDER_GL_LIBRARIES "${OPENGLES_LIBRARY}") | list(APPEND BLENDER_GL_LIBRARIES "${OPENGLES_LIBRARY}") | ||||
| if(NOT OPENGLES_LIBRARY) | if(NOT OPENGLES_LIBRARY) | ||||
| ▲ Show 20 Lines • Show All 43 Lines • ▼ Show 20 Lines | else() | ||||
| if(OpenGL_GL_PREFERENCE STREQUAL "LEGACY" AND OPENGL_gl_LIBRARY) | if(OpenGL_GL_PREFERENCE STREQUAL "LEGACY" AND OPENGL_gl_LIBRARY) | ||||
| list(APPEND BLENDER_GL_LIBRARIES ${OPENGL_gl_LIBRARY}) | list(APPEND BLENDER_GL_LIBRARIES ${OPENGL_gl_LIBRARY}) | ||||
| else() | else() | ||||
| list(APPEND BLENDER_GL_LIBRARIES ${OPENGL_opengl_LIBRARY} ${OPENGL_glx_LIBRARY}) | list(APPEND BLENDER_GL_LIBRARIES ${OPENGL_opengl_LIBRARY} ${OPENGL_glx_LIBRARY}) | ||||
| endif() | endif() | ||||
| endif() | endif() | ||||
| if(WITH_GL_EGL) | if(WITH_GL_EGL) | ||||
| list(APPEND GL_DEFINITIONS -DWITH_GL_EGL) | find_package(OpenGL REQUIRED EGL) | ||||
| list(APPEND BLENDER_GL_LIBRARIES OpenGL::EGL) | |||||
| list(APPEND GL_DEFINITIONS -DWITH_GL_EGL -DGLEW_EGL -DGLEW_INC_EGL) | |||||
| if(WITH_SYSTEM_GLES) | if(WITH_SYSTEM_GLES) | ||||
| if(NOT OPENGLES_EGL_LIBRARY) | if(NOT OPENGLES_EGL_LIBRARY) | ||||
| message(FATAL_ERROR | message(FATAL_ERROR | ||||
| "Unable to find OpenGL ES libraries. " | "Unable to find OpenGL ES libraries. " | ||||
| "Install them or disable WITH_SYSTEM_GLES." | "Install them or disable WITH_SYSTEM_GLES." | ||||
| ) | ) | ||||
| endif() | endif() | ||||
| list(APPEND BLENDER_GL_LIBRARIES OPENGLES_EGL_LIBRARY) | list(APPEND BLENDER_GL_LIBRARIES ${OPENGLES_EGL_LIBRARY}) | ||||
| else() | else() | ||||
| set(OPENGLES_EGL_LIBRARY "" CACHE FILEPATH "EGL library file") | set(OPENGLES_EGL_LIBRARY "" CACHE FILEPATH "EGL library file") | ||||
| mark_as_advanced(OPENGLES_EGL_LIBRARY) | mark_as_advanced(OPENGLES_EGL_LIBRARY) | ||||
| list(APPEND BLENDER_GL_LIBRARIES "${OPENGLES_LIBRARY}" "${OPENGLES_EGL_LIBRARY}") | list(APPEND BLENDER_GL_LIBRARIES "${OPENGLES_LIBRARY}" "${OPENGLES_EGL_LIBRARY}") | ||||
| if(NOT OPENGLES_EGL_LIBRARY) | if(NOT OPENGLES_EGL_LIBRARY) | ||||
| Show All 23 Lines | |||||
| endif() | endif() | ||||
| if(WITH_GL_PROFILE_ES20) | if(WITH_GL_PROFILE_ES20) | ||||
| list(APPEND GL_DEFINITIONS -DWITH_GL_PROFILE_ES20) | list(APPEND GL_DEFINITIONS -DWITH_GL_PROFILE_ES20) | ||||
| else() | else() | ||||
| list(APPEND GL_DEFINITIONS -DWITH_GL_PROFILE_CORE) | list(APPEND GL_DEFINITIONS -DWITH_GL_PROFILE_CORE) | ||||
| endif() | endif() | ||||
| if(WITH_GL_EGL) | |||||
| list(APPEND GL_DEFINITIONS -DWITH_EGL) | |||||
| endif() | |||||
| #----------------------------------------------------------------------------- | #----------------------------------------------------------------------------- | ||||
| # Configure OpenMP. | # Configure OpenMP. | ||||
| if(WITH_OPENMP) | if(WITH_OPENMP) | ||||
| if(NOT OPENMP_CUSTOM) | if(NOT OPENMP_CUSTOM) | ||||
| find_package(OpenMP) | find_package(OpenMP) | ||||
| endif() | endif() | ||||
| if(OPENMP_FOUND) | if(OPENMP_FOUND) | ||||
| ▲ Show 20 Lines • Show All 55 Lines • ▼ Show 20 Lines | if(WITH_GL_PROFILE_ES20) | ||||
| # ToDo: This is an experiment to eliminate ES 1 symbols, | # ToDo: This is an experiment to eliminate ES 1 symbols, | ||||
| # GLEW doesn't really properly provide this level of control | # GLEW doesn't really properly provide this level of control | ||||
| # (for example, without modification it eliminates too many symbols) | # (for example, without modification it eliminates too many symbols) | ||||
| # so there are lots of modifications to GLEW to make this work, | # so there are lots of modifications to GLEW to make this work, | ||||
| # and no attempt to make it work beyond Blender at this point. | # and no attempt to make it work beyond Blender at this point. | ||||
| list(APPEND GL_DEFINITIONS -DGL_ES_VERSION_1_0=0 -DGL_ES_VERSION_CL_1_1=0 -DGL_ES_VERSION_CM_1_1=0) | list(APPEND GL_DEFINITIONS -DGL_ES_VERSION_1_0=0 -DGL_ES_VERSION_CL_1_1=0 -DGL_ES_VERSION_CM_1_1=0) | ||||
| endif() | endif() | ||||
| if(WITH_GL_EGL) | |||||
| list(APPEND GL_DEFINITIONS -DGLEW_INC_EGL) | |||||
| endif() | |||||
| set(BLENDER_GLEW_LIBRARIES extern_glew_es bf_intern_glew_mx) | set(BLENDER_GLEW_LIBRARIES extern_glew_es bf_intern_glew_mx) | ||||
| else() | else() | ||||
| set(GLEW_INCLUDE_PATH "${CMAKE_SOURCE_DIR}/extern/glew/include") | set(GLEW_INCLUDE_PATH "${CMAKE_SOURCE_DIR}/extern/glew/include") | ||||
| list(APPEND GL_DEFINITIONS -DGLEW_STATIC) | list(APPEND GL_DEFINITIONS -DGLEW_STATIC) | ||||
| # This won't affect the non-experimental glew library, | # This won't affect the non-experimental glew library, | ||||
| ▲ Show 20 Lines • Show All 629 Lines • Show Last 20 Lines | |||||