Changeset View
Changeset View
Standalone View
Standalone View
CMakeLists.txt
| Show First 20 Lines • Show All 222 Lines • ▼ Show 20 Lines | if(WITH_X11) | ||||
| option(WITH_X11_XINPUT "Enable X11 Xinput (tablet support and unicode input)" ON) | option(WITH_X11_XINPUT "Enable X11 Xinput (tablet support and unicode input)" ON) | ||||
| option(WITH_X11_XF86VMODE "Enable X11 video mode switching" ON) | option(WITH_X11_XF86VMODE "Enable X11 video mode switching" ON) | ||||
| option(WITH_X11_XFIXES "Enable X11 XWayland cursor warping workaround" ON) | option(WITH_X11_XFIXES "Enable X11 XWayland cursor warping workaround" ON) | ||||
| option(WITH_X11_ALPHA "Enable X11 transparent background" ON) | option(WITH_X11_ALPHA "Enable X11 transparent background" ON) | ||||
| endif() | endif() | ||||
| if(UNIX AND NOT APPLE) | if(UNIX AND NOT APPLE) | ||||
| option(WITH_SYSTEM_GLEW "Use GLEW OpenGL wrapper library provided by the operating system" OFF) | option(WITH_SYSTEM_GLEW "Use GLEW OpenGL wrapper library provided by the operating system" OFF) | ||||
| option(WITH_GLES "Use OpenGL ES" OFF) | |||||
brecht: `WITH_GL_PROFILE_ES20` already exists for this purpose, it even mentions EGL in the description. | |||||
Done Inline ActionsI did not use WITH_GL_PROFILE_ES20 since this specifically refers to OpenGL ES 2.0, while WITH_GLES is supposed to cover any OpenGL ES usage. christian.rauch: I did not use `WITH_GL_PROFILE_ES20` since this specifically refers to OpenGL ES 2.0, while… | |||||
Done Inline ActionsWITH_GL_PROFILE_ES20 may have been better named WITH_GL_PROFILE_ES, but it really is intended for any OpenGL ES usage. If we have two flags it's too confusing. brecht: `WITH_GL_PROFILE_ES20` may have been better named `WITH_GL_PROFILE_ES`, but it really is… | |||||
Done Inline ActionsWould you mind, if I would then rename WITH_GL_PROFILE_ES20 to WITH_GL_PROFILE_ES and use it in place of WITH_GLES? christian.rauch: Would you mind, if I would then rename `WITH_GL_PROFILE_ES20` to `WITH_GL_PROFILE_ES` and use… | |||||
| option(WITH_SYSTEM_GLES "Use OpenGL ES library provided by the operating system" ON) | option(WITH_SYSTEM_GLES "Use OpenGL ES library provided by the operating system" ON) | ||||
| else() | else() | ||||
| # not an option for other OS's | # not an option for other OS's | ||||
| set(WITH_SYSTEM_GLEW OFF) | set(WITH_SYSTEM_GLEW OFF) | ||||
| set(WITH_GLES OFF) | |||||
| set(WITH_SYSTEM_GLES OFF) | set(WITH_SYSTEM_GLES OFF) | ||||
| endif() | endif() | ||||
| if(UNIX AND NOT APPLE) | if(UNIX AND NOT APPLE) | ||||
| option(WITH_SYSTEM_EIGEN3 "Use the systems Eigen3 library" OFF) | option(WITH_SYSTEM_EIGEN3 "Use the systems Eigen3 library" OFF) | ||||
| endif() | endif() | ||||
| ▲ Show 20 Lines • Show All 725 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) | ||||
| find_package(OpenGL REQUIRED EGL) | |||||
| list(APPEND BLENDER_GL_LIBRARIES OpenGL::EGL) | |||||
| list(APPEND GL_DEFINITIONS -DWITH_GL_EGL) | list(APPEND GL_DEFINITIONS -DWITH_GL_EGL) | ||||
| if(WITH_GLES) | |||||
| 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) | ||||
| message(FATAL_ERROR | message(FATAL_ERROR | ||||
| "To compile WITH_GL_EGL you need to set OPENGLES_EGL_LIBRARY " | "To compile WITH_GL_EGL you need to set OPENGLES_EGL_LIBRARY " | ||||
| "to the file path of an EGL library." | "to the file path of an EGL library." | ||||
| ) | ) | ||||
| endif() | endif() | ||||
| endif() | endif() | ||||
| endif() | |||||
| if(WIN32) | if(WIN32) | ||||
| # Setup paths to files needed to install and redistribute Windows Blender with OpenGL ES | # Setup paths to files needed to install and redistribute Windows Blender with OpenGL ES | ||||
| set(OPENGLES_EGL_DLL "" CACHE FILEPATH "EGL redistributable DLL file") | set(OPENGLES_EGL_DLL "" CACHE FILEPATH "EGL redistributable DLL file") | ||||
| mark_as_advanced(OPENGLES_EGL_DLL) | mark_as_advanced(OPENGLES_EGL_DLL) | ||||
| if(NOT OPENGLES_EGL_DLL) | if(NOT OPENGLES_EGL_DLL) | ||||
| message(FATAL_ERROR | message(FATAL_ERROR | ||||
| "To compile WITH_GL_EGL you need to set OPENGLES_EGL_DLL " | "To compile WITH_GL_EGL you need to set OPENGLES_EGL_DLL " | ||||
| "to the file path of an EGL runtime dynamic link library (DLL)." | "to the file path of an EGL runtime dynamic link library (DLL)." | ||||
| ) | ) | ||||
| endif() | endif() | ||||
| endif() | endif() | ||||
| 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 704 Lines • Show Last 20 Lines | |||||
WITH_GL_PROFILE_ES20 already exists for this purpose, it even mentions EGL in the description.
Can you chqnge the code so WITH_GLES is not needed?