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:
authorBrecht Van Lommel <brecht>2022-06-29 20:31:07 +0300
committerChristian Rauch <Rauch.Christian@gmx.de>2022-07-04 11:48:45 +0300
commita30814363331ca1b8d5332feec57b97ceb411640 (patch)
tree38c0a0bb0f9f4cfdf55f8c437227c54f46ecec85
parente4b5a0d0b02b8edf4b178a5c2796575b68e319c2 (diff)
move epoxy discovery to platform scripts
-rw-r--r--CMakeLists.txt6
-rw-r--r--build_files/cmake/platform/platform_apple.cmake3
-rw-r--r--build_files/cmake/platform/platform_unix.cmake1
-rw-r--r--build_files/cmake/platform/platform_win32.cmake3
-rw-r--r--intern/cycles/app/CMakeLists.txt4
-rw-r--r--intern/cycles/blender/CMakeLists.txt2
-rw-r--r--intern/cycles/cmake/external_libs.cmake16
-rw-r--r--intern/cycles/device/hip/device_impl.cpp1
-rw-r--r--intern/cycles/hydra/CMakeLists.txt2
-rw-r--r--intern/ghost/CMakeLists.txt8
-rw-r--r--intern/opencolorio/CMakeLists.txt1
-rw-r--r--intern/opensubdiv/CMakeLists.txt1
-rw-r--r--source/blender/gpu/CMakeLists.txt5
-rw-r--r--source/blender/python/generic/CMakeLists.txt2
-rw-r--r--source/blender/python/gpu/CMakeLists.txt2
15 files changed, 45 insertions, 12 deletions
diff --git a/CMakeLists.txt b/CMakeLists.txt
index ac524619809..0619cc11211 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -1320,12 +1320,6 @@ else()
list(APPEND GL_DEFINITIONS -DWITH_GL_PROFILE_CORE)
endif()
-# link libepoxy
-set(EPOXY_ROOT_DIR ${LIBDIR}/libepoxy)
-find_package(LibEpoxy REQUIRED)
-list(APPEND BLENDER_GL_LIBRARIES ${LibEpoxy_LIBRARIES})
-include_directories(${LibEpoxy_INCLUDE_DIRS})
-
#-----------------------------------------------------------------------------
# Configure Metal.
if (WITH_METAL_BACKEND)
diff --git a/build_files/cmake/platform/platform_apple.cmake b/build_files/cmake/platform/platform_apple.cmake
index 32b10625590..dfe0ed8527d 100644
--- a/build_files/cmake/platform/platform_apple.cmake
+++ b/build_files/cmake/platform/platform_apple.cmake
@@ -223,6 +223,9 @@ if(WITH_SDL)
endif()
endif()
+set(EPOXY_ROOT_DIR ${LIBDIR}/libepoxy)
+find_package(LibEpoxy REQUIRED)
+
set(PNG_ROOT ${LIBDIR}/png)
find_package(PNG REQUIRED)
diff --git a/build_files/cmake/platform/platform_unix.cmake b/build_files/cmake/platform/platform_unix.cmake
index dff860d9876..18b38de3deb 100644
--- a/build_files/cmake/platform/platform_unix.cmake
+++ b/build_files/cmake/platform/platform_unix.cmake
@@ -95,6 +95,7 @@ find_package_wrapper(JPEG REQUIRED)
find_package_wrapper(PNG REQUIRED)
find_package_wrapper(ZLIB REQUIRED)
find_package_wrapper(Zstd REQUIRED)
+find_package_wrapper(LibEpoxy REQUIRED)
if(NOT WITH_SYSTEM_FREETYPE)
# FreeType compiled with Brotli compression for woff2.
diff --git a/build_files/cmake/platform/platform_win32.cmake b/build_files/cmake/platform/platform_win32.cmake
index 7e272ea26b0..71d60e56213 100644
--- a/build_files/cmake/platform/platform_win32.cmake
+++ b/build_files/cmake/platform/platform_win32.cmake
@@ -323,6 +323,9 @@ if(NOT JPEG_FOUND)
set(JPEG_LIBRARIES ${LIBDIR}/jpeg/lib/libjpeg.lib)
endif()
+set(EPOXY_ROOT_DIR ${LIBDIR}/libepoxy)
+find_package(LibEpoxy REQUIRED)
+
set(PTHREADS_INCLUDE_DIRS ${LIBDIR}/pthreads/include)
set(PTHREADS_LIBRARIES ${LIBDIR}/pthreads/lib/pthreadVC3.lib)
diff --git a/intern/cycles/app/CMakeLists.txt b/intern/cycles/app/CMakeLists.txt
index 4c9eb9a143c..fe8325f636e 100644
--- a/intern/cycles/app/CMakeLists.txt
+++ b/intern/cycles/app/CMakeLists.txt
@@ -44,8 +44,8 @@ endif()
if(WITH_CYCLES_STANDALONE AND WITH_CYCLES_STANDALONE_GUI)
add_definitions(${GL_DEFINITIONS})
- list(APPEND INC_SYS ${SDL2_INCLUDE_DIRS})
- list(APPEND LIB ${CYCLES_GL_LIBRARIES} ${SDL2_LIBRARIES})
+ list(APPEND INC_SYS ${LibEpoxy_INCLUDE_DIRS} ${SDL2_INCLUDE_DIRS})
+ list(APPEND LIB ${CYCLES_GL_LIBRARIES} ${LibEpoxy_LIBRARIES} ${SDL2_LIBRARIES})
endif()
cycles_external_libraries_append(LIB)
diff --git a/intern/cycles/blender/CMakeLists.txt b/intern/cycles/blender/CMakeLists.txt
index a53b2528582..1dcbdf8f457 100644
--- a/intern/cycles/blender/CMakeLists.txt
+++ b/intern/cycles/blender/CMakeLists.txt
@@ -12,6 +12,7 @@ set(INC
)
set(INC_SYS
+ ${LibEpoxy_INCLUDE_DIRS}
${PYTHON_INCLUDE_DIRS}
)
@@ -62,6 +63,7 @@ set(LIB
cycles_subd
cycles_util
+ ${LibEpoxy_LIBRARIES}
${PYTHON_LINKFLAGS}
${PYTHON_LIBRARIES}
)
diff --git a/intern/cycles/cmake/external_libs.cmake b/intern/cycles/cmake/external_libs.cmake
index 497c9a5407c..c152f2b5e4c 100644
--- a/intern/cycles/cmake/external_libs.cmake
+++ b/intern/cycles/cmake/external_libs.cmake
@@ -505,6 +505,22 @@ if(CYCLES_STANDALONE_REPOSITORY)
endif()
###########################################################################
+# Libepoxy
+###########################################################################
+
+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(LibEpoxy_LIBRARIES "${_cycles_lib_dir}/libepoxy/lib/epoxy.lib")
+ set(LibEpoxy_INCLUDE_DIRS "${_cycles_lib_dir}/libepoxy/include")
+ else()
+ find_package(LibEpoxy REQUIRED)
+ endif()
+ endif()
+endif()
+
+###########################################################################
# Alembic
###########################################################################
diff --git a/intern/cycles/device/hip/device_impl.cpp b/intern/cycles/device/hip/device_impl.cpp
index 82db55ea715..a84f1edd70e 100644
--- a/intern/cycles/device/hip/device_impl.cpp
+++ b/intern/cycles/device/hip/device_impl.cpp
@@ -16,7 +16,6 @@
# include "util/log.h"
# include "util/map.h"
# include "util/md5.h"
-# include "util/opengl.h"
# include "util/path.h"
# include "util/string.h"
# include "util/system.h"
diff --git a/intern/cycles/hydra/CMakeLists.txt b/intern/cycles/hydra/CMakeLists.txt
index e7c2e0dafa9..67a4585b507 100644
--- a/intern/cycles/hydra/CMakeLists.txt
+++ b/intern/cycles/hydra/CMakeLists.txt
@@ -10,12 +10,14 @@ set(INC
)
set(INC_SYS
${USD_INCLUDE_DIRS}
+ ${LibEpoxy_INCLUDE_DIRS}
)
set(LIB
cycles_scene
cycles_session
cycles_graph
+ ${LibEpoxy_LIBRARIES}
)
cycles_external_libraries_append(LIB)
diff --git a/intern/ghost/CMakeLists.txt b/intern/ghost/CMakeLists.txt
index 6ee5dece064..da7b4ffe589 100644
--- a/intern/ghost/CMakeLists.txt
+++ b/intern/ghost/CMakeLists.txt
@@ -7,7 +7,9 @@ set(INC
../../source/blender/makesdna
)
-set(INC_SYS )
+set(INC_SYS
+ ${LibEpoxy_INCLUDE_DIRS}
+)
set(SRC
intern/GHOST_Buttons.cpp
@@ -64,7 +66,9 @@ set(SRC
intern/GHOST_WindowManager.h
)
-set(LIB )
+set(LIB
+ ${LibEpoxy_LIBRARIES}
+)
if(WITH_GHOST_DEBUG)
list(APPEND SRC
diff --git a/intern/opencolorio/CMakeLists.txt b/intern/opencolorio/CMakeLists.txt
index a725a32b39a..187fcd5d539 100644
--- a/intern/opencolorio/CMakeLists.txt
+++ b/intern/opencolorio/CMakeLists.txt
@@ -36,6 +36,7 @@ if(WITH_OPENCOLORIO)
list(APPEND INC_SYS
${OPENCOLORIO_INCLUDE_DIRS}
+ ${LibEpoxy_INCLUDE_DIRS}
)
list(APPEND SRC
diff --git a/intern/opensubdiv/CMakeLists.txt b/intern/opensubdiv/CMakeLists.txt
index 7d15936d0a0..f828724a8c8 100644
--- a/intern/opensubdiv/CMakeLists.txt
+++ b/intern/opensubdiv/CMakeLists.txt
@@ -29,6 +29,7 @@ if(WITH_OPENSUBDIV)
list(APPEND INC_SYS
${OPENSUBDIV_INCLUDE_DIRS}
+ ${LibEpoxy_INCLUDE_DIRS}
)
list(APPEND SRC
diff --git a/source/blender/gpu/CMakeLists.txt b/source/blender/gpu/CMakeLists.txt
index 71355236ba0..09478b20d3a 100644
--- a/source/blender/gpu/CMakeLists.txt
+++ b/source/blender/gpu/CMakeLists.txt
@@ -38,7 +38,9 @@ set(INC
../../../intern/mantaflow/extern
)
-set(INC_SYS )
+set(INC_SYS
+ ${LibEpoxy_INCLUDE_DIRS}
+)
set(SRC
intern/gpu_batch.cc
@@ -216,6 +218,7 @@ endif()
set(LIB
${BLENDER_GL_LIBRARIES}
+ ${LibEpoxy_LIBRARIES}
)
set(MSL_SRC
diff --git a/source/blender/python/generic/CMakeLists.txt b/source/blender/python/generic/CMakeLists.txt
index a53228eda6e..dee10d57ffd 100644
--- a/source/blender/python/generic/CMakeLists.txt
+++ b/source/blender/python/generic/CMakeLists.txt
@@ -11,6 +11,7 @@ set(INC
)
set(INC_SYS
+ ${LibEpoxy_INCLUDE_DIRS}
${PYTHON_INCLUDE_DIRS}
)
@@ -39,6 +40,7 @@ set(SRC
)
set(LIB
+ ${LibEpoxy_LIBRARIES}
${PYTHON_LINKFLAGS}
${PYTHON_LIBRARIES}
)
diff --git a/source/blender/python/gpu/CMakeLists.txt b/source/blender/python/gpu/CMakeLists.txt
index 941b1bcc935..68a72638ac1 100644
--- a/source/blender/python/gpu/CMakeLists.txt
+++ b/source/blender/python/gpu/CMakeLists.txt
@@ -12,6 +12,7 @@ set(INC
)
set(INC_SYS
+ ${LibEpoxy_INCLUDE_DIRS}
${PYTHON_INCLUDE_DIRS}
)
@@ -57,6 +58,7 @@ set(SRC
)
set(LIB
+ ${LibEpoxy_LIBRARIES}
${PYTHON_LINKFLAGS}
${PYTHON_LIBRARIES}
)