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:
authorSebastian Parborg <darkdefende@gmail.com>2022-08-15 17:44:24 +0300
committerSebastian Parborg <darkdefende@gmail.com>2022-08-15 17:47:20 +0300
commit8ffc11dbcb21e81634e8f22cd65fdc921c7320d1 (patch)
tree9392fe6f5951f6ffd0d7d5fbeea34e5f728d8b4b /intern/cycles
parenta296b8f694d1a93d40da78312758580f69b43be7 (diff)
Cleanup OpenGL linking and related code after libepoxy merge
This cleans up the OpenGL build flags and linking. It additionally also removes some dead code. One of these dead code paths is WITH_X11_ALPHA which actually never was active even with the build flag on. The call to use this was never called because the default initializer for GHOST was set to have it off per default. Nothing called this function with a boolean value to enable it. These cleanups are needed to support true headless OpenGL rendering. Without these cleanups libepoxy will fail to load the correct OpenGL Libraries as we have already linked them to the blender binary. Reviewed By: Brecht, Campbell, Jeroen Differential Revision: http://developer.blender.org/D15554
Diffstat (limited to 'intern/cycles')
-rw-r--r--intern/cycles/app/CMakeLists.txt3
-rw-r--r--intern/cycles/blender/CMakeLists.txt2
-rw-r--r--intern/cycles/cmake/external_libs.cmake19
-rw-r--r--intern/cycles/device/CMakeLists.txt3
-rw-r--r--intern/cycles/hydra/CMakeLists.txt2
-rw-r--r--intern/cycles/scene/CMakeLists.txt2
-rw-r--r--intern/cycles/session/CMakeLists.txt2
-rw-r--r--intern/cycles/util/CMakeLists.txt2
8 files changed, 1 insertions, 34 deletions
diff --git a/intern/cycles/app/CMakeLists.txt b/intern/cycles/app/CMakeLists.txt
index d46ece55256..0988b1c0ac4 100644
--- a/intern/cycles/app/CMakeLists.txt
+++ b/intern/cycles/app/CMakeLists.txt
@@ -43,9 +43,8 @@ else()
endif()
if(WITH_CYCLES_STANDALONE AND WITH_CYCLES_STANDALONE_GUI)
- add_definitions(${GL_DEFINITIONS})
list(APPEND INC_SYS ${Epoxy_INCLUDE_DIRS} ${SDL2_INCLUDE_DIRS})
- list(APPEND LIB ${CYCLES_GL_LIBRARIES} ${Epoxy_LIBRARIES} ${SDL2_LIBRARIES})
+ list(APPEND LIB ${Epoxy_LIBRARIES} ${SDL2_LIBRARIES})
endif()
cycles_external_libraries_append(LIB)
diff --git a/intern/cycles/blender/CMakeLists.txt b/intern/cycles/blender/CMakeLists.txt
index 095615f15d5..ab0937ac9eb 100644
--- a/intern/cycles/blender/CMakeLists.txt
+++ b/intern/cycles/blender/CMakeLists.txt
@@ -87,8 +87,6 @@ set(ADDON_FILES
addon/version_update.py
)
-add_definitions(${GL_DEFINITIONS})
-
if(WITH_CYCLES_DEVICE_HIP)
add_definitions(-DWITH_HIP)
endif()
diff --git a/intern/cycles/cmake/external_libs.cmake b/intern/cycles/cmake/external_libs.cmake
index bc859d830ba..af2f280ae84 100644
--- a/intern/cycles/cmake/external_libs.cmake
+++ b/intern/cycles/cmake/external_libs.cmake
@@ -550,25 +550,6 @@ if(EXISTS ${_cycles_lib_dir})
endif()
###########################################################################
-# OpenGL
-###########################################################################
-
-if((WITH_CYCLES_STANDALONE AND WITH_CYCLES_STANDALONE_GUI) OR
- WITH_CYCLES_HYDRA_RENDER_DELEGATE)
- if(CYCLES_STANDALONE_REPOSITORY)
- if(NOT DEFINED OpenGL_GL_PREFERENCE)
- set(OpenGL_GL_PREFERENCE "LEGACY")
- endif()
-
- find_package(OpenGL REQUIRED)
-
- set(CYCLES_GL_LIBRARIES ${OPENGL_gl_LIBRARY})
- else()
- set(CYCLES_GL_LIBRARIES ${BLENDER_GL_LIBRARIES})
- endif()
-endif()
-
-###########################################################################
# SDL
###########################################################################
diff --git a/intern/cycles/device/CMakeLists.txt b/intern/cycles/device/CMakeLists.txt
index 71789a76406..4ae123cd634 100644
--- a/intern/cycles/device/CMakeLists.txt
+++ b/intern/cycles/device/CMakeLists.txt
@@ -147,7 +147,6 @@ set(SRC
set(LIB
cycles_kernel
cycles_util
- ${CYCLES_GL_LIBRARIES}
)
if(WITH_CYCLES_DEVICE_OPTIX OR WITH_CYCLES_DEVICE_CUDA)
@@ -168,8 +167,6 @@ if(WITH_CYCLES_DEVICE_HIP AND WITH_HIP_DYNLOAD)
)
endif()
-add_definitions(${GL_DEFINITIONS})
-
if(WITH_CYCLES_DEVICE_CUDA)
add_definitions(-DWITH_CUDA)
endif()
diff --git a/intern/cycles/hydra/CMakeLists.txt b/intern/cycles/hydra/CMakeLists.txt
index 60bb40a0d63..2bbd46db582 100644
--- a/intern/cycles/hydra/CMakeLists.txt
+++ b/intern/cycles/hydra/CMakeLists.txt
@@ -64,8 +64,6 @@ set(SRC_HD_CYCLES
volume.cpp
)
-add_definitions(${GL_DEFINITIONS})
-
if(WITH_OPENVDB)
add_definitions(-DWITH_OPENVDB ${OPENVDB_DEFINITIONS})
list(APPEND INC_SYS
diff --git a/intern/cycles/scene/CMakeLists.txt b/intern/cycles/scene/CMakeLists.txt
index 4904bf247ba..a30f408f207 100644
--- a/intern/cycles/scene/CMakeLists.txt
+++ b/intern/cycles/scene/CMakeLists.txt
@@ -148,6 +148,4 @@ endif()
include_directories(${INC})
include_directories(SYSTEM ${INC_SYS})
-add_definitions(${GL_DEFINITIONS})
-
cycles_add_library(cycles_scene "${LIB}" ${SRC} ${SRC_HEADERS})
diff --git a/intern/cycles/session/CMakeLists.txt b/intern/cycles/session/CMakeLists.txt
index 6e4e6af6e71..4f3a0a99ee1 100644
--- a/intern/cycles/session/CMakeLists.txt
+++ b/intern/cycles/session/CMakeLists.txt
@@ -32,6 +32,4 @@ set(LIB
include_directories(${INC})
include_directories(SYSTEM ${INC_SYS})
-add_definitions(${GL_DEFINITIONS})
-
cycles_add_library(cycles_session "${LIB}" ${SRC} ${SRC_HEADERS})
diff --git a/intern/cycles/util/CMakeLists.txt b/intern/cycles/util/CMakeLists.txt
index 2dafe729dfe..997d574a3b0 100644
--- a/intern/cycles/util/CMakeLists.txt
+++ b/intern/cycles/util/CMakeLists.txt
@@ -148,6 +148,4 @@ endif()
include_directories(${INC})
include_directories(SYSTEM ${INC_SYS})
-add_definitions(${GL_DEFINITIONS})
-
cycles_add_library(cycles_util "${LIB}" ${SRC} ${SRC_HEADERS})