diff options
Diffstat (limited to 'build_files')
23 files changed, 259 insertions, 218 deletions
diff --git a/build_files/build_environment/CMakeLists.txt b/build_files/build_environment/CMakeLists.txt index 856fe7b32ff..ee8a9a26c53 100644 --- a/build_files/build_environment/CMakeLists.txt +++ b/build_files/build_environment/CMakeLists.txt @@ -53,8 +53,8 @@ include(cmake/imath.cmake) include(cmake/openexr.cmake) include(cmake/brotli.cmake) include(cmake/freetype.cmake) +include(cmake/epoxy.cmake) include(cmake/freeglut.cmake) -include(cmake/glew.cmake) include(cmake/alembic.cmake) include(cmake/opensubdiv.cmake) include(cmake/sdl.cmake) diff --git a/build_files/build_environment/cmake/check_software.cmake b/build_files/build_environment/cmake/check_software.cmake index 080c1e52973..cc8fead6f81 100644 --- a/build_files/build_environment/cmake/check_software.cmake +++ b/build_files/build_environment/cmake/check_software.cmake @@ -12,21 +12,13 @@ if(UNIX) automake bison ${_libtoolize_name} + meson + ninja pkg-config tclsh yasm ) - if(NOT APPLE) - set(_required_software - ${_required_software} - - # Needed for Mesa. - meson - ninja - ) - endif() - foreach(_software ${_required_software}) find_program(_software_find NAMES ${_software}) if(NOT _software_find) @@ -57,7 +49,7 @@ if(UNIX) " apt install autoconf automake libtool yasm tcl ninja-build meson python3-mako\n" "\n" "On macOS (with homebrew):\n" - " brew install autoconf automake bison flex libtool pkg-config yasm\n" + " brew install autoconf automake bison flex libtool meson ninja pkg-config yasm\n" "\n" "Other platforms:\n" " Install equivalent packages.\n") diff --git a/build_files/build_environment/cmake/download.cmake b/build_files/build_environment/cmake/download.cmake index 76744aa9b0c..938a140194a 100644 --- a/build_files/build_environment/cmake/download.cmake +++ b/build_files/build_environment/cmake/download.cmake @@ -1,7 +1,7 @@ # SPDX-License-Identifier: GPL-2.0-or-later ## Update and uncomment this in the release branch -set(BLENDER_VERSION 3.3) +# set(BLENDER_VERSION 3.1) function(download_source dep) set(TARGET_FILE ${${dep}_FILE}) @@ -36,7 +36,7 @@ download_source(BLOSC) download_source(PTHREADS) download_source(OPENEXR) download_source(FREETYPE) -download_source(GLEW) +download_source(EPOXY) download_source(FREEGLUT) download_source(ALEMBIC) download_source(OPENSUBDIV) diff --git a/build_files/build_environment/cmake/epoxy.cmake b/build_files/build_environment/cmake/epoxy.cmake new file mode 100644 index 00000000000..4cd9158f2ac --- /dev/null +++ b/build_files/build_environment/cmake/epoxy.cmake @@ -0,0 +1,25 @@ +# SPDX-License-Identifier: GPL-2.0-or-later +if(WIN32) + set(EPOXY_LIB_TYPE shared) +else() + set(EPOXY_LIB_TYPE static) +endif() +ExternalProject_Add(external_epoxy + URL file://${PACKAGE_DIR}/${EPOXY_FILE} + DOWNLOAD_DIR ${DOWNLOAD_DIR} + URL_HASH ${EPOXY_HASH_TYPE}=${EPOXY_HASH} + PREFIX ${BUILD_DIR}/epoxy + PATCH_COMMAND ${PATCH_CMD} -p 1 -N -d ${BUILD_DIR}/epoxy/src/external_epoxy/ < ${PATCH_DIR}/epoxy.diff + CONFIGURE_COMMAND ${CONFIGURE_ENV} && meson setup --prefix ${LIBDIR}/epoxy --default-library ${EPOXY_LIB_TYPE} --libdir lib ${BUILD_DIR}/epoxy/src/external_epoxy-build ${BUILD_DIR}/epoxy/src/external_epoxy -Dtests=false + BUILD_COMMAND ninja + INSTALL_COMMAND ninja install +) + +if(BUILD_MODE STREQUAL Release AND WIN32) + ExternalProject_Add_Step(external_epoxy after_install + COMMAND ${CMAKE_COMMAND} -E copy_directory ${LIBDIR}/epoxy/include ${HARVEST_TARGET}/epoxy/include + COMMAND ${CMAKE_COMMAND} -E copy ${LIBDIR}/epoxy/bin/epoxy-0.dll ${HARVEST_TARGET}/epoxy/bin/epoxy-0.dll + COMMAND ${CMAKE_COMMAND} -E copy ${LIBDIR}/epoxy/lib/epoxy.lib ${HARVEST_TARGET}/epoxy/lib/epoxy.lib + DEPENDEES install + ) +endif() diff --git a/build_files/build_environment/cmake/glew.cmake b/build_files/build_environment/cmake/glew.cmake deleted file mode 100644 index 0745ad01533..00000000000 --- a/build_files/build_environment/cmake/glew.cmake +++ /dev/null @@ -1,16 +0,0 @@ -# SPDX-License-Identifier: GPL-2.0-or-later - -set(GLEW_EXTRA_ARGS - -DBUILD_UTILS=Off - -DBUILD_SHARED_LIBS=Off -) - -ExternalProject_Add(external_glew - URL file://${PACKAGE_DIR}/${GLEW_FILE} - DOWNLOAD_DIR ${DOWNLOAD_DIR} - URL_HASH ${GLEW_HASH_TYPE}=${GLEW_HASH} - PATCH_COMMAND COMMAND ${CMAKE_COMMAND} -E copy ${PATCH_DIR}/cmakelists_glew.txt ${BUILD_DIR}/glew/src/external_glew/CMakeLists.txt - PREFIX ${BUILD_DIR}/glew - CMAKE_ARGS -DCMAKE_POSITION_INDEPENDENT_CODE=ON -DCMAKE_INSTALL_PREFIX=${LIBDIR}/glew ${DEFAULT_CMAKE_FLAGS} ${GLEW_EXTRA_ARGS} - INSTALL_DIR ${LIBDIR}/glew -) diff --git a/build_files/build_environment/cmake/harvest.cmake b/build_files/build_environment/cmake/harvest.cmake index bc456858d2a..6ed98398fde 100644 --- a/build_files/build_environment/cmake/harvest.cmake +++ b/build_files/build_environment/cmake/harvest.cmake @@ -22,9 +22,6 @@ if(BUILD_MODE STREQUAL Release) # freeglut-> opengl ${CMAKE_COMMAND} -E copy ${LIBDIR}/freeglut/lib/freeglut_static.lib ${HARVEST_TARGET}/opengl/lib/freeglut_static.lib && ${CMAKE_COMMAND} -E copy_directory ${LIBDIR}/freeglut/include/ ${HARVEST_TARGET}/opengl/include/ && - # glew-> opengl - ${CMAKE_COMMAND} -E copy ${LIBDIR}/glew/lib/libglew32.lib ${HARVEST_TARGET}/opengl/lib/glew.lib && - ${CMAKE_COMMAND} -E copy_directory ${LIBDIR}/glew/include/ ${HARVEST_TARGET}/opengl/include/ && DEPENDS ) endif() @@ -43,7 +40,8 @@ function(harvest from to) install( FILES ${LIBDIR}/${from} DESTINATION ${HARVEST_TARGET}/${dirpath} - RENAME ${filename}) + RENAME ${filename} + ) else() install( DIRECTORY ${LIBDIR}/${from}/ @@ -53,7 +51,8 @@ function(harvest from to) PATTERN "pkgconfig" EXCLUDE PATTERN "cmake" EXCLUDE PATTERN "__pycache__" EXCLUDE - PATTERN "tests" EXCLUDE) + PATTERN "tests" EXCLUDE + ) endif() endfunction() @@ -73,8 +72,8 @@ harvest(fftw3/lib fftw3/lib "*.a") harvest(flac/lib sndfile/lib "libFLAC.a") harvest(freetype/include freetype/include "*.h") harvest(freetype/lib/libfreetype2ST.a freetype/lib/libfreetype.a) -harvest(glew/include glew/include "*.h") -harvest(glew/lib glew/lib "*.a") +harvest(epoxy/include epoxy/include "*.h") +harvest(epoxy/lib epoxy/lib "*.a") harvest(gmp/include gmp/include "*.h") harvest(gmp/lib gmp/lib "*.a") harvest(jemalloc/include jemalloc/include "*.h") diff --git a/build_files/build_environment/cmake/versions.cmake b/build_files/build_environment/cmake/versions.cmake index d0bcdc21b20..2a3e64c6bcb 100644 --- a/build_files/build_environment/cmake/versions.cmake +++ b/build_files/build_environment/cmake/versions.cmake @@ -80,11 +80,11 @@ set(FREETYPE_HASH bd4e3b007474319909a6b79d50908e85) set(FREETYPE_HASH_TYPE MD5) set(FREETYPE_FILE freetype-${FREETYPE_VERSION}.tar.gz) -set(GLEW_VERSION 1.13.0) -set(GLEW_URI http://prdownloads.sourceforge.net/glew/glew/${GLEW_VERSION}/glew-${GLEW_VERSION}.tgz) -set(GLEW_HASH 7cbada3166d2aadfc4169c4283701066) -set(GLEW_HASH_TYPE MD5) -set(GLEW_FILE glew-${GLEW_VERSION}.tgz) +set(EPOXY_VERSION 1.5.10) +set(EPOXY_URI https://github.com/anholt/libepoxy/archive/refs/tags/${EPOXY_VERSION}.tar.gz) +set(EPOXY_HASH f0730aad115c952e77591fcc805b1dc1) +set(EPOXY_HASH_TYPE MD5) +set(EPOXY_FILE libepoxy-${EPOXY_VERSION}.tar.gz) set(FREEGLUT_VERSION 3.0.0) set(FREEGLUT_URI http://prdownloads.sourceforge.net/freeglut/freeglut/${FREEGLUT_VERSION}/freeglut-${FREEGLUT_VERSION}.tar.gz) diff --git a/build_files/build_environment/install_deps.sh b/build_files/build_environment/install_deps.sh index 4ffdbf2d162..814834ccf34 100755 --- a/build_files/build_environment/install_deps.sh +++ b/build_files/build_environment/install_deps.sh @@ -1193,7 +1193,7 @@ Those libraries should be available as packages in all recent distributions (opt * libx11, libxcursor, libxi, libxrandr, libxinerama (and other libx... as needed). * libwayland-client0, libwayland-cursor0, libwayland-egl1, libxkbcommon0, libdbus-1-3, libegl1 (Wayland) * libsqlite3, libzstd, libbz2, libssl, libfftw3, libxml2, libtinyxml, yasm, libyaml-cpp, flex. - * libsdl2, libglew, libpugixml, libpotrace, [libgmp], fontconfig, [libharu/libhpdf].\"" + * libsdl2, libepoxy, libpugixml, libpotrace, [libgmp], fontconfig, [libharu/libhpdf].\"" DEPS_SPECIFIC_INFO="\"BUILDABLE DEPENDENCIES: @@ -4062,7 +4062,7 @@ install_DEB() { libxcursor-dev libxi-dev wget libsqlite3-dev libxrandr-dev libxinerama-dev \ libwayland-dev wayland-protocols libegl-dev libxkbcommon-dev libdbus-1-dev linux-libc-dev \ libbz2-dev libncurses5-dev libssl-dev liblzma-dev libreadline-dev \ - libopenal-dev libglew-dev yasm \ + libopenal-dev libepoxy-dev yasm \ libsdl2-dev libfftw3-dev patch bzip2 libxml2-dev libtinyxml-dev libjemalloc-dev \ libgmp-dev libpugixml-dev libpotrace-dev libhpdf-dev libzstd-dev libpystring-dev" @@ -4772,7 +4772,7 @@ install_RPM() { libX11-devel libXi-devel libXcursor-devel libXrandr-devel libXinerama-devel \ wayland-devel wayland-protocols-devel mesa-libEGL-devel libxkbcommon-devel dbus-devel kernel-headers \ wget ncurses-devel readline-devel $OPENJPEG_DEV openal-soft-devel \ - glew-devel yasm patch \ + libepoxy-devel yasm patch \ libxml2-devel yaml-cpp-devel tinyxml-devel jemalloc-devel \ gmp-devel pugixml-devel potrace-devel libharu-devel libzstd-devel pystring-devel" @@ -5412,7 +5412,7 @@ install_ARCH() { fi _packages="$BASE_DEVEL git cmake fontconfig flex \ - libxi libxcursor libxrandr libxinerama glew libpng libtiff wget openal \ + libxi libxcursor libxrandr libxinerama libepoxy libpng libtiff wget openal \ $OPENJPEG_DEV yasm sdl2 fftw \ libxml2 yaml-cpp tinyxml python-requests jemalloc gmp potrace pugixml libharu \ zstd pystring" diff --git a/build_files/build_environment/patches/cmakelists_glew.txt b/build_files/build_environment/patches/cmakelists_glew.txt deleted file mode 100644 index ec36d4bde63..00000000000 --- a/build_files/build_environment/patches/cmakelists_glew.txt +++ /dev/null @@ -1,2 +0,0 @@ -cmake_minimum_required (VERSION 2.4) -add_subdirectory(build/cmake)
\ No newline at end of file diff --git a/build_files/build_environment/patches/epoxy.diff b/build_files/build_environment/patches/epoxy.diff new file mode 100644 index 00000000000..b0c3d7ea1dc --- /dev/null +++ b/build_files/build_environment/patches/epoxy.diff @@ -0,0 +1,19 @@ +--- a/src/dispatch_wgl.c 2022-08-04 17:45:13.144924705 +0200 ++++ b/src/dispatch_wgl.c 2022-08-04 17:45:47.657482971 +0200 +@@ -78,6 +78,8 @@ + if (!first_context_current) { + first_context_current = true; + } else { ++ /* BLENDER: disable slow dispatch table switching. */ ++#if 0 + if (!already_switched_to_dispatch_table) { + already_switched_to_dispatch_table = true; + gl_switch_to_dispatch_table(); +@@ -86,6 +88,7 @@ + + gl_init_dispatch_table(); + wgl_init_dispatch_table(); ++#endif + } + } + diff --git a/build_files/cmake/Modules/FindEpoxy.cmake b/build_files/cmake/Modules/FindEpoxy.cmake new file mode 100644 index 00000000000..7cd26e45398 --- /dev/null +++ b/build_files/cmake/Modules/FindEpoxy.cmake @@ -0,0 +1,47 @@ +# SPDX-License-Identifier: BSD-3-Clause +# Copyright 2022 Blender Foundation. + +# This module defines +# Epoxy_INCLUDE_DIRS, where to find epoxy/gl.h +# Epoxy_LIBRARY, where to find the epoxy library. +# Epoxy_ROOT_DIR, The base directory to search for epoxy. +# This can also be an environment variable. +# Epoxy_FOUND, If false, do not try to use epoxy. + +IF(NOT EPOXY_ROOT_DIR AND NOT $ENV{EPOXY_ROOT_DIR} STREQUAL "") + SET(EPOXY_ROOT_DIR $ENV{EPOXY_ROOT_DIR}) +ENDIF() + +FIND_PATH(Epoxy_INCLUDE_DIR + NAMES + epoxy/gl.h + HINTS + ${EPOXY_ROOT_DIR} + PATH_SUFFIXES + include +) + +FIND_LIBRARY(Epoxy_LIBRARY + NAMES + epoxy + HINTS + ${EPOXY_ROOT_DIR} + PATH_SUFFIXES + lib64 lib +) + +# handle the QUIETLY and REQUIRED arguments and set Epoxy_FOUND to TRUE if +# all listed variables are TRUE +INCLUDE(FindPackageHandleStandardArgs) +FIND_PACKAGE_HANDLE_STANDARD_ARGS(Epoxy DEFAULT_MSG + Epoxy_LIBRARY Epoxy_INCLUDE_DIR) + +IF(Epoxy_FOUND) + SET(Epoxy_INCLUDE_DIRS ${Epoxy_INCLUDE_DIR}) + SET(Epoxy_LIBRARIES ${Epoxy_LIBRARY}) +ENDIF() + +MARK_AS_ADVANCED( + Epoxy_INCLUDE_DIR + Epoxy_LIBRARY +) diff --git a/build_files/cmake/Modules/FindGLEW.cmake b/build_files/cmake/Modules/FindGLEW.cmake deleted file mode 100644 index 33b989ec49e..00000000000 --- a/build_files/cmake/Modules/FindGLEW.cmake +++ /dev/null @@ -1,58 +0,0 @@ -# SPDX-License-Identifier: BSD-3-Clause -# Copyright 2014 Blender Foundation. - -# - Find GLEW library -# Find the native Glew includes and library -# This module defines -# GLEW_INCLUDE_DIRS, where to find glew.h, Set when -# GLEW_INCLUDE_DIR is found. -# GLEW_ROOT_DIR, The base directory to search for Glew. -# This can also be an environment variable. -# GLEW_FOUND, If false, do not try to use Glew. -# -# also defined, -# GLEW_LIBRARY, where to find the Glew library. - -# If GLEW_ROOT_DIR was defined in the environment, use it. -IF(NOT GLEW_ROOT_DIR AND NOT $ENV{GLEW_ROOT_DIR} STREQUAL "") - SET(GLEW_ROOT_DIR $ENV{GLEW_ROOT_DIR}) -ENDIF() - -SET(_glew_SEARCH_DIRS - ${GLEW_ROOT_DIR} -) - -FIND_PATH(GLEW_INCLUDE_DIR - NAMES - GL/glew.h - HINTS - ${_glew_SEARCH_DIRS} - PATH_SUFFIXES - include -) - -FIND_LIBRARY(GLEW_LIBRARY - NAMES - GLEW - HINTS - ${_glew_SEARCH_DIRS} - PATH_SUFFIXES - lib64 lib - ) - -# handle the QUIETLY and REQUIRED arguments and set GLEW_FOUND to TRUE if -# all listed variables are TRUE -INCLUDE(FindPackageHandleStandardArgs) -FIND_PACKAGE_HANDLE_STANDARD_ARGS(GLEW DEFAULT_MSG - GLEW_LIBRARY GLEW_INCLUDE_DIR) - -IF(GLEW_FOUND) - SET(GLEW_INCLUDE_DIRS ${GLEW_INCLUDE_DIR}) -ENDIF() - -MARK_AS_ADVANCED( - GLEW_INCLUDE_DIR - GLEW_LIBRARY -) - -UNSET(_glew_SEARCH_DIRS) diff --git a/build_files/cmake/Modules/FindLibEpoxy.cmake b/build_files/cmake/Modules/FindLibEpoxy.cmake new file mode 100644 index 00000000000..1da52f95f68 --- /dev/null +++ b/build_files/cmake/Modules/FindLibEpoxy.cmake @@ -0,0 +1,47 @@ +# SPDX-License-Identifier: BSD-3-Clause +# Copyright 2022 Blender Foundation. + +# This module defines +# LibEpoxy_INCLUDE_DIRS, where to find epoxy/gl.h +# LibEpoxy_LIBRARY, where to find the epoxy library. +# LibEpoxy_ROOT_DIR, The base directory to search for libepoxy. +# This can also be an environment variable. +# LibEpoxy_FOUND, If false, do not try to use libepoxy. + +IF(NOT EPOXY_ROOT_DIR AND NOT $ENV{EPOXY_ROOT_DIR} STREQUAL "") + SET(EPOXY_ROOT_DIR $ENV{EPOXY_ROOT_DIR}) +ENDIF() + +FIND_PATH(LibEpoxy_INCLUDE_DIR + NAMES + epoxy/gl.h + HINTS + ${EPOXY_ROOT_DIR} + PATH_SUFFIXES + include +) + +FIND_LIBRARY(LibEpoxy_LIBRARY + NAMES + epoxy + HINTS + ${EPOXY_ROOT_DIR} + PATH_SUFFIXES + lib64 lib +) + +# handle the QUIETLY and REQUIRED arguments and set LibEpoxy_FOUND to TRUE if +# all listed variables are TRUE +INCLUDE(FindPackageHandleStandardArgs) +FIND_PACKAGE_HANDLE_STANDARD_ARGS(LibEpoxy DEFAULT_MSG + LibEpoxy_LIBRARY LibEpoxy_INCLUDE_DIR) + +IF(LibEpoxy_FOUND) + SET(LibEpoxy_INCLUDE_DIRS ${LibEpoxy_INCLUDE_DIR}) + SET(LibEpoxy_LIBRARIES ${LibEpoxy_LIBRARY}) +ENDIF() + +MARK_AS_ADVANCED( + LibEpoxy_INCLUDE_DIR + LibEpoxy_LIBRARY +) diff --git a/build_files/cmake/Modules/FindOpenGLES.cmake b/build_files/cmake/Modules/FindOpenGLES.cmake deleted file mode 100644 index 5e82984bed6..00000000000 --- a/build_files/cmake/Modules/FindOpenGLES.cmake +++ /dev/null @@ -1,80 +0,0 @@ -# SPDX-License-Identifier: BSD-3-Clause -# Copyright 2014 Blender Foundation. - -# - Try to find OpenGLES -# Once done this will define -# -# OPENGLES_FOUND - system has OpenGLES and EGL -# OPENGL_EGL_FOUND - system has EGL -# OPENGLES_INCLUDE_DIR - the GLES include directory -# OPENGLES_LIBRARY - the GLES library -# OPENGLES_EGL_INCLUDE_DIR - the EGL include directory -# OPENGLES_EGL_LIBRARY - the EGL library -# OPENGLES_LIBRARIES - all libraries needed for OpenGLES -# OPENGLES_INCLUDES - all includes needed for OpenGLES - -# If OPENGLES_ROOT_DIR was defined in the environment, use it. -IF(NOT OPENGLES_ROOT_DIR AND NOT $ENV{OPENGLES_ROOT_DIR} STREQUAL "") - SET(OPENGLES_ROOT_DIR $ENV{OPENGLES_ROOT_DIR}) -ENDIF() - -SET(_opengles_SEARCH_DIRS - ${OPENGLES_ROOT_DIR} -) - -FIND_PATH(OPENGLES_INCLUDE_DIR - NAMES - GLES2/gl2.h - HINTS - ${_opengles_SEARCH_DIRS} -) - -FIND_LIBRARY(OPENGLES_LIBRARY - NAMES - GLESv2 - PATHS - ${_opengles_SEARCH_DIRS} - PATH_SUFFIXES - lib64 lib -) - -FIND_PATH(OPENGLES_EGL_INCLUDE_DIR - NAMES - EGL/egl.h - HINTS - ${_opengles_SEARCH_DIRS} -) - -FIND_LIBRARY(OPENGLES_EGL_LIBRARY - NAMES - EGL - HINTS - ${_opengles_SEARCH_DIRS} - PATH_SUFFIXES - lib64 lib -) - -IF(OPENGLES_EGL_LIBRARY AND OPENGLES_EGL_INCLUDE_DIR) - SET(OPENGL_EGL_FOUND "YES") -ELSE() - SET(OPENGL_EGL_FOUND "NO") -ENDIF() - -IF(OPENGLES_LIBRARY AND OPENGLES_INCLUDE_DIR AND - OPENGLES_EGL_LIBRARY AND OPENGLES_EGL_INCLUDE_DIR) - SET(OPENGLES_LIBRARIES ${OPENGLES_LIBRARY} ${OPENGLES_LIBRARIES} - ${OPENGLES_EGL_LIBRARY}) - SET(OPENGLES_INCLUDES ${OPENGLES_INCLUDE_DIR} ${OPENGLES_EGL_INCLUDE_DIR}) - SET(OPENGLES_FOUND "YES") -ELSE() - SET(OPENGLES_FOUND "NO") -ENDIF() - -MARK_AS_ADVANCED( - OPENGLES_EGL_INCLUDE_DIR - OPENGLES_EGL_LIBRARY - OPENGLES_LIBRARY - OPENGLES_INCLUDE_DIR -) - -UNSET(_opengles_SEARCH_DIRS) diff --git a/build_files/cmake/config/blender_full.cmake b/build_files/cmake/config/blender_full.cmake index e09577ac802..27577a9fbf7 100644 --- a/build_files/cmake/config/blender_full.cmake +++ b/build_files/cmake/config/blender_full.cmake @@ -13,7 +13,7 @@ set(WITH_BULLET ON CACHE BOOL "" FORCE) set(WITH_CODEC_AVI ON CACHE BOOL "" FORCE) set(WITH_CODEC_FFMPEG ON CACHE BOOL "" FORCE) set(WITH_CODEC_SNDFILE ON CACHE BOOL "" FORCE) -set(WITH_COMPOSITOR ON CACHE BOOL "" FORCE) +set(WITH_COMPOSITOR_CPU ON CACHE BOOL "" FORCE) set(WITH_CYCLES ON CACHE BOOL "" FORCE) set(WITH_CYCLES_EMBREE ON CACHE BOOL "" FORCE) set(WITH_CYCLES_OSL ON CACHE BOOL "" FORCE) diff --git a/build_files/cmake/config/blender_lite.cmake b/build_files/cmake/config/blender_lite.cmake index 5ce344d39e8..c98dfe27285 100644 --- a/build_files/cmake/config/blender_lite.cmake +++ b/build_files/cmake/config/blender_lite.cmake @@ -18,7 +18,7 @@ set(WITH_BULLET OFF CACHE BOOL "" FORCE) set(WITH_CODEC_AVI OFF CACHE BOOL "" FORCE) set(WITH_CODEC_FFMPEG OFF CACHE BOOL "" FORCE) set(WITH_CODEC_SNDFILE OFF CACHE BOOL "" FORCE) -set(WITH_COMPOSITOR OFF CACHE BOOL "" FORCE) +set(WITH_COMPOSITOR_CPU OFF CACHE BOOL "" FORCE) set(WITH_COREAUDIO OFF CACHE BOOL "" FORCE) set(WITH_CYCLES OFF CACHE BOOL "" FORCE) set(WITH_DRACO OFF CACHE BOOL "" FORCE) diff --git a/build_files/cmake/config/blender_release.cmake b/build_files/cmake/config/blender_release.cmake index 2567e0b444a..3661b1de805 100644 --- a/build_files/cmake/config/blender_release.cmake +++ b/build_files/cmake/config/blender_release.cmake @@ -14,7 +14,7 @@ set(WITH_BULLET ON CACHE BOOL "" FORCE) set(WITH_CODEC_AVI ON CACHE BOOL "" FORCE) set(WITH_CODEC_FFMPEG ON CACHE BOOL "" FORCE) set(WITH_CODEC_SNDFILE ON CACHE BOOL "" FORCE) -set(WITH_COMPOSITOR ON CACHE BOOL "" FORCE) +set(WITH_COMPOSITOR_CPU ON CACHE BOOL "" FORCE) set(WITH_CYCLES ON CACHE BOOL "" FORCE) set(WITH_CYCLES_EMBREE ON CACHE BOOL "" FORCE) set(WITH_CYCLES_OSL ON CACHE BOOL "" FORCE) diff --git a/build_files/cmake/have_features.cmake b/build_files/cmake/have_features.cmake new file mode 100644 index 00000000000..dc3b61849ea --- /dev/null +++ b/build_files/cmake/have_features.cmake @@ -0,0 +1,33 @@ +# SPDX-License-Identifier: GPL-2.0-or-later +# Copyright 2022 Blender Foundation. All rights reserved. + +# This file is used to test the system for headers & symbols. +# Variables should use the `HAVE_` prefix. +# Defines should use the same name as the CMAKE variable. + +include(CheckSymbolExists) + +# Used for: `intern/guardedalloc/intern/mallocn_intern.h`. +# Function `malloc_stats` is only available on GLIBC, +# so check that before defining `HAVE_MALLOC_STATS`. +check_symbol_exists(malloc_stats "malloc.h" HAVE_MALLOC_STATS_H) + +# Used for: `source/creator/creator_signals.c`. +# The function `feenableexcept` is not present non-GLIBC systems, +# hence we need to check if it's available in the `fenv.h` file. +set(HAVE_FEENABLEEXCEPT OFF) +if(CMAKE_SYSTEM_NAME STREQUAL "Linux") + check_symbol_exists(feenableexcept "fenv.h" HAVE_FEENABLEEXCEPT) +endif() + +# Used for: `source/blender/blenlib/intern/system.c`. +# `execinfo` is not available on non-GLIBC systems (at least not on MUSL-LIBC), +# so check the presence of the header before including it and using the it for back-trace. +set(HAVE_EXECINFO_H OFF) +if(NOT MSVC) + include(CheckIncludeFiles) + check_include_files("execinfo.h" HAVE_EXECINFO_H) + if(HAVE_EXECINFO_H) + add_definitions(-DHAVE_EXECINFO_H) + endif() +endif() diff --git a/build_files/cmake/platform/platform_apple.cmake b/build_files/cmake/platform/platform_apple.cmake index f84be3c5238..f39cb7a4951 100644 --- a/build_files/cmake/platform/platform_apple.cmake +++ b/build_files/cmake/platform/platform_apple.cmake @@ -226,6 +226,9 @@ if(WITH_SDL) endif() endif() +set(EPOXY_ROOT_DIR ${LIBDIR}/epoxy) +find_package(Epoxy 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 f6e233a0c86..f18638dfa6b 100644 --- a/build_files/cmake/platform/platform_unix.cmake +++ b/build_files/cmake/platform/platform_unix.cmake @@ -95,6 +95,19 @@ find_package_wrapper(JPEG REQUIRED) find_package_wrapper(PNG REQUIRED) find_package_wrapper(ZLIB REQUIRED) find_package_wrapper(Zstd REQUIRED) +find_package_wrapper(Epoxy REQUIRED) + +function(check_freetype_for_brotli) + include(CheckSymbolExists) + set(CMAKE_REQUIRED_INCLUDES ${FREETYPE_INCLUDE_DIRS}) + check_symbol_exists(FT_CONFIG_OPTION_USE_BROTLI "freetype/config/ftconfig.h" HAVE_BROTLI) + unset(CMAKE_REQUIRED_INCLUDES) + if(NOT HAVE_BROTLI) + unset(HAVE_BROTLI CACHE) + message(FATAL_ERROR "Freetype needs to be compiled with brotli support!") + endif() + unset(HAVE_BROTLI CACHE) +endfunction() if(NOT WITH_SYSTEM_FREETYPE) # FreeType compiled with Brotli compression for woff2. @@ -110,6 +123,7 @@ if(NOT WITH_SYSTEM_FREETYPE) # ${BROTLI_LIBRARIES} # ) endif() + check_freetype_for_brotli() endif() if(WITH_PYTHON) @@ -587,6 +601,7 @@ if(WITH_SYSTEM_FREETYPE) if(NOT FREETYPE_FOUND) message(FATAL_ERROR "Failed finding system FreeType version!") endif() + check_freetype_for_brotli() endif() if(WITH_LZO AND WITH_SYSTEM_LZO) @@ -789,7 +804,8 @@ if(CMAKE_COMPILER_IS_GNUCC) "The mold linker could not find the directory containing the linker command " "(typically " "\"${MOLD_PREFIX}/libexec/mold/ld\") or " - "\"${MOLD_PREFIX}/lib/mold/ld\") using system linker.") + "\"${MOLD_PREFIX}/lib/mold/ld\") using system linker." + ) set(WITH_LINKER_MOLD OFF) endif() unset(MOLD_PREFIX) @@ -928,7 +944,8 @@ function(CONFIGURE_ATOMIC_LIB_IF_NEEDED) int main(int argc, char **argv) { std::atomic<uint64_t> uint64; uint64++; return 0; - }") + }" + ) include(CheckCXXSourceCompiles) check_cxx_source_compiles("${_source}" ATOMIC_OPS_WITHOUT_LIBATOMIC) @@ -940,6 +957,7 @@ function(CONFIGURE_ATOMIC_LIB_IF_NEEDED) set(CMAKE_REQUIRED_LIBRARIES atomic) check_cxx_source_compiles("${_source}" ATOMIC_OPS_WITH_LIBATOMIC) + unset(CMAKE_REQUIRED_LIBRARIES) if(ATOMIC_OPS_WITH_LIBATOMIC) set(PLATFORM_LINKFLAGS "${PLATFORM_LINKFLAGS} -latomic" PARENT_SCOPE) diff --git a/build_files/cmake/platform/platform_win32.cmake b/build_files/cmake/platform/platform_win32.cmake index 7e272ea26b0..66ab0d4169a 100644 --- a/build_files/cmake/platform/platform_win32.cmake +++ b/build_files/cmake/platform/platform_win32.cmake @@ -146,7 +146,7 @@ endif() if(WITH_COMPILER_ASAN AND MSVC AND NOT MSVC_CLANG) if(CMAKE_CXX_COMPILER_VERSION VERSION_GREATER_EQUAL 19.28.29828) #set a flag so we don't have to do this comparison all the time - SET(MSVC_ASAN ON) + set(MSVC_ASAN ON) set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} /fsanitize=address") set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} /fsanitize=address") string(APPEND CMAKE_EXE_LINKER_FLAGS_DEBUG " /INCREMENTAL:NO") @@ -185,20 +185,20 @@ endif() if(WITH_WINDOWS_SCCACHE) - set(CMAKE_C_COMPILER_LAUNCHER sccache) - set(CMAKE_CXX_COMPILER_LAUNCHER sccache) + set(CMAKE_C_COMPILER_LAUNCHER sccache) + set(CMAKE_CXX_COMPILER_LAUNCHER sccache) + set(SYMBOL_FORMAT /Z7) + set(SYMBOL_FORMAT_RELEASE /Z7) +else() + unset(CMAKE_C_COMPILER_LAUNCHER) + unset(CMAKE_CXX_COMPILER_LAUNCHER) + if(MSVC_ASAN) set(SYMBOL_FORMAT /Z7) set(SYMBOL_FORMAT_RELEASE /Z7) -else() - unset(CMAKE_C_COMPILER_LAUNCHER) - unset(CMAKE_CXX_COMPILER_LAUNCHER) - if(MSVC_ASAN) - set(SYMBOL_FORMAT /Z7) - set(SYMBOL_FORMAT_RELEASE /Z7) - else() - set(SYMBOL_FORMAT /ZI) - set(SYMBOL_FORMAT_RELEASE /Zi) - endif() + else() + set(SYMBOL_FORMAT /ZI) + set(SYMBOL_FORMAT_RELEASE /Zi) + endif() endif() if(WITH_WINDOWS_PDB) @@ -323,6 +323,13 @@ if(NOT JPEG_FOUND) set(JPEG_LIBRARIES ${LIBDIR}/jpeg/lib/libjpeg.lib) endif() +set(EPOXY_ROOT_DIR ${LIBDIR}/epoxy) +windows_find_package(Epoxy REQUIRED) +if(NOT EPOXY_FOUND) + set(Epoxy_INCLUDE_DIRS ${LIBDIR}/epoxy/include) + set(Epoxy_LIBRARIES ${LIBDIR}/epoxy/lib/epoxy.lib) +endif() + set(PTHREADS_INCLUDE_DIRS ${LIBDIR}/pthreads/include) set(PTHREADS_LIBRARIES ${LIBDIR}/pthreads/lib/pthreadVC3.lib) @@ -416,7 +423,7 @@ if(WITH_CODEC_FFMPEG) ${LIBDIR}/ffmpeg/lib/avdevice.lib ${LIBDIR}/ffmpeg/lib/avutil.lib ${LIBDIR}/ffmpeg/lib/swscale.lib - ) + ) endif() endif() @@ -565,12 +572,14 @@ if(WITH_BOOST) if(WITH_CYCLES AND WITH_CYCLES_OSL) set(BOOST_LIBRARIES ${BOOST_LIBRARIES} optimized ${BOOST_LIBPATH}/libboost_wave-${BOOST_POSTFIX} - debug ${BOOST_LIBPATH}/libboost_wave-${BOOST_DEBUG_POSTFIX}) + debug ${BOOST_LIBPATH}/libboost_wave-${BOOST_DEBUG_POSTFIX} + ) endif() if(WITH_INTERNATIONAL) set(BOOST_LIBRARIES ${BOOST_LIBRARIES} optimized ${BOOST_LIBPATH}/libboost_locale-${BOOST_POSTFIX} - debug ${BOOST_LIBPATH}/libboost_locale-${BOOST_DEBUG_POSTFIX}) + debug ${BOOST_LIBPATH}/libboost_locale-${BOOST_DEBUG_POSTFIX} + ) endif() else() # we found boost using find_package set(BOOST_INCLUDE_DIR ${Boost_INCLUDE_DIRS}) @@ -677,7 +686,8 @@ if(WITH_OPENIMAGEDENOISE) optimized ${OPENIMAGEDENOISE_LIBPATH}/dnnl.lib debug ${OPENIMAGEDENOISE_LIBPATH}/OpenImageDenoise_d.lib debug ${OPENIMAGEDENOISE_LIBPATH}/common_d.lib - debug ${OPENIMAGEDENOISE_LIBPATH}/dnnl_d.lib) + debug ${OPENIMAGEDENOISE_LIBPATH}/dnnl_d.lib + ) set(OPENIMAGEDENOISE_DEFINITIONS) endif() @@ -832,7 +842,8 @@ if(WITH_CYCLES AND WITH_CYCLES_EMBREE) debug ${LIBDIR}/embree/lib/math_d.lib debug ${LIBDIR}/embree/lib/simd_d.lib debug ${LIBDIR}/embree/lib/sys_d.lib - debug ${LIBDIR}/embree/lib/tasking_d.lib) + debug ${LIBDIR}/embree/lib/tasking_d.lib + ) endif() endif() diff --git a/build_files/config/pipeline_config.yaml b/build_files/config/pipeline_config.yaml index aedaf35629b..82cd009ea95 100644 --- a/build_files/config/pipeline_config.yaml +++ b/build_files/config/pipeline_config.yaml @@ -5,38 +5,38 @@ update-code: git: submodules: - - branch: blender-v3.3-release + - branch: master commit_id: HEAD path: release/scripts/addons - - branch: blender-v3.3-release + - branch: master commit_id: HEAD path: release/scripts/addons_contrib - - branch: blender-v3.3-release + - branch: master commit_id: HEAD path: release/datafiles/locale - - branch: blender-v3.3-release + - branch: master commit_id: HEAD path: source/tools svn: libraries: darwin-arm64: - branch: tags/blender-3.3-release + branch: trunk commit_id: HEAD path: lib/darwin_arm64 darwin-x86_64: - branch: tags/blender-3.3-release + branch: trunk commit_id: HEAD path: lib/darwin linux-x86_64: - branch: tags/blender-3.3-release + branch: trunk commit_id: HEAD path: lib/linux_centos7_x86_64 windows-amd64: - branch: tags/blender-3.3-release + branch: trunk commit_id: HEAD path: lib/win64_vc15 tests: - branch: tags/blender-3.3-release + branch: trunk commit_id: HEAD path: lib/tests benchmarks: diff --git a/build_files/utils/make_update.py b/build_files/utils/make_update.py index bf140812ebb..254cccda301 100755 --- a/build_files/utils/make_update.py +++ b/build_files/utils/make_update.py @@ -110,6 +110,9 @@ def svn_update(args, release_version): if not make_utils.command_missing(args.svn_command): call(svn_non_interactive + ["cleanup", lib_dirpath]) continue + elif dirname.startswith("."): + # Temporary paths such as ".mypy_cache" will report a warning, skip hidden directories. + continue svn_dirpath = os.path.join(dirpath, ".svn") svn_root_dirpath = os.path.join(lib_dirpath, ".svn") |