diff options
author | Christian Rauch <Rauch.Christian@gmx.de> | 2022-08-15 15:58:04 +0300 |
---|---|---|
committer | Brecht Van Lommel <brecht@blender.org> | 2022-08-15 17:10:29 +0300 |
commit | a296b8f694d1a93d40da78312758580f69b43be7 (patch) | |
tree | fd5791d3227411c905c7c728f2d97fe19e28156f /intern/cycles/cmake | |
parent | 90be364ca9b86f6dac78925166ba3ea567fc950d (diff) |
GPU: replace GLEW with libepoxy
With libepoxy we can choose between EGL and GLX at runtime, as well as
dynamically open EGL and GLX libraries without linking to them.
This will make it possible to build with Wayland, EGL, GLVND support while
still running on systems that only have X11, GLX and libGL. It also paves
the way for headless rendering through EGL.
libepoxy is a new library dependency, and is included in the precompiled
libraries. GLEW is no longer a dependency, and WITH_SYSTEM_GLEW was removed.
Includes contributions by Brecht Van Lommel, Ray Molenkamp, Campbell Barton
and Sergey Sharybin.
Ref T76428
Differential Revision: https://developer.blender.org/D15291
Diffstat (limited to 'intern/cycles/cmake')
-rw-r--r-- | intern/cycles/cmake/external_libs.cmake | 15 |
1 files changed, 4 insertions, 11 deletions
diff --git a/intern/cycles/cmake/external_libs.cmake b/intern/cycles/cmake/external_libs.cmake index 51830250f2e..bc859d830ba 100644 --- a/intern/cycles/cmake/external_libs.cmake +++ b/intern/cycles/cmake/external_libs.cmake @@ -505,26 +505,19 @@ if(CYCLES_STANDALONE_REPOSITORY) endif() ########################################################################### -# GLEW +# Epoxy ########################################################################### if(CYCLES_STANDALONE_REPOSITORY) if((WITH_CYCLES_STANDALONE AND WITH_CYCLES_STANDALONE_GUI) OR WITH_CYCLES_HYDRA_RENDER_DELEGATE) if(MSVC AND EXISTS ${_cycles_lib_dir}) - set(GLEW_LIBRARY "${_cycles_lib_dir}/opengl/lib/glew.lib") - set(GLEW_INCLUDE_DIR "${_cycles_lib_dir}/opengl/include") - add_definitions(-DGLEW_STATIC) + set(Epoxy_LIBRARIES "${_cycles_lib_dir}/epoxy/lib/epoxy.lib") + set(Epoxy_INCLUDE_DIRS "${_cycles_lib_dir}/epoxy/include") else() - find_package(GLEW REQUIRED) + find_package(Epoxy REQUIRED) endif() - - set(CYCLES_GLEW_LIBRARIES ${GLEW_LIBRARY}) endif() -else() - # Workaround for unconventional variable name use in Blender. - set(GLEW_INCLUDE_DIR "${GLEW_INCLUDE_PATH}") - set(CYCLES_GLEW_LIBRARIES bf_intern_glew_mx ${BLENDER_GLEW_LIBRARIES}) endif() ########################################################################### |