Mesh: Replace auto smooth with node group #108014
|
@ -1,5 +1,6 @@
|
|||
# SPDX-FileCopyrightText: 2006 Blender Foundation
|
||||
#
|
||||
# SPDX-License-Identifier: GPL-2.0-or-later
|
||||
# Copyright 2006 Blender Foundation
|
||||
|
||||
# -----------------------------------------------------------------------------
|
||||
# Early Initialization
|
||||
|
@ -517,7 +518,7 @@ if(NOT APPLE)
|
|||
mark_as_advanced(WITH_CYCLES_DEVICE_CUDA)
|
||||
|
||||
option(WITH_CYCLES_CUDA_BINARIES "Build Cycles NVIDIA CUDA binaries" OFF)
|
||||
set(CYCLES_CUDA_BINARIES_ARCH sm_30 sm_35 sm_37 sm_50 sm_52 sm_60 sm_61 sm_70 sm_75 sm_86 sm_89 compute_75 CACHE STRING "CUDA architectures to build binaries for")
|
||||
set(CYCLES_CUDA_BINARIES_ARCH sm_30 sm_35 sm_37 sm_50 sm_52 sm_60 sm_61 sm_70 sm_75 sm_86 sm_89 compute_89 CACHE STRING "CUDA architectures to build binaries for")
|
||||
option(WITH_CYCLES_CUDA_BUILD_SERIAL "Build cubins one after another (useful on machines with limited RAM)" OFF)
|
||||
option(WITH_CUDA_DYNLOAD "Dynamically load CUDA libraries at runtime (for developers, makes cuda-gdb work)" ON)
|
||||
|
||||
|
|
|
@ -1,3 +1,5 @@
|
|||
# SPDX-FileCopyrightText: 2011-2023 Blender Foundation
|
||||
#
|
||||
# SPDX-License-Identifier: GPL-2.0-or-later
|
||||
|
||||
# This Makefile does an out-of-source CMake build in ../build_`OS`_`CPU`
|
||||
|
|
|
@ -41,8 +41,8 @@ include(cmake/boost_build_options.cmake)
|
|||
include(cmake/download.cmake)
|
||||
include(cmake/macros.cmake)
|
||||
|
||||
if(ENABLE_MINGW64)
|
||||
include(cmake/setup_mingw64.cmake)
|
||||
if(ENABLE_MSYS2)
|
||||
include(cmake/setup_msys2.cmake)
|
||||
else()
|
||||
set(mingw_LIBDIR ${LIBDIR})
|
||||
endif()
|
||||
|
@ -129,13 +129,10 @@ if(NOT APPLE)
|
|||
include(cmake/level-zero.cmake)
|
||||
endif()
|
||||
|
||||
if(NOT WIN32 OR ENABLE_MINGW64)
|
||||
if(NOT WIN32 OR ENABLE_MSYS2)
|
||||
include(cmake/gmp.cmake)
|
||||
include(cmake/openjpeg.cmake)
|
||||
if(NOT WIN32 OR BUILD_MODE STREQUAL Release)
|
||||
if(WIN32)
|
||||
include(cmake/zlib_mingw.cmake)
|
||||
endif()
|
||||
include(cmake/lame.cmake)
|
||||
include(cmake/ogg.cmake)
|
||||
include(cmake/vorbis.cmake)
|
||||
|
@ -143,16 +140,12 @@ if(NOT WIN32 OR ENABLE_MINGW64)
|
|||
include(cmake/opus.cmake)
|
||||
include(cmake/vpx.cmake)
|
||||
include(cmake/x264.cmake)
|
||||
include(cmake/xvidcore.cmake)
|
||||
include(cmake/aom.cmake)
|
||||
include(cmake/ffmpeg.cmake)
|
||||
include(cmake/fftw.cmake)
|
||||
include(cmake/flac.cmake)
|
||||
include(cmake/sndfile.cmake)
|
||||
if(WIN32)
|
||||
include(cmake/iconv.cmake)
|
||||
endif()
|
||||
if(UNIX)
|
||||
include(cmake/flac.cmake)
|
||||
if(NOT APPLE)
|
||||
include(cmake/spnav.cmake)
|
||||
include(cmake/jemalloc.cmake)
|
||||
|
|
|
@ -1,3 +1,5 @@
|
|||
# SPDX-FileCopyrightText: 2017-2022 Blender Foundation
|
||||
#
|
||||
# SPDX-License-Identifier: GPL-2.0-or-later
|
||||
|
||||
set(ALEMBIC_EXTRA_ARGS
|
||||
|
|
|
@ -1,15 +1,8 @@
|
|||
# SPDX-FileCopyrightText: 2022-2023 Blender Foundation
|
||||
#
|
||||
# SPDX-License-Identifier: GPL-2.0-or-later
|
||||
|
||||
if(WIN32)
|
||||
# The default generator on windows is msbuild, which we do not
|
||||
# want to use for this dep, as needs to build with mingw
|
||||
set(AOM_GENERATOR "Ninja")
|
||||
# The default flags are full of MSVC options given this will be
|
||||
# building with mingw, it'll have an unhappy time with that and
|
||||
# we need to clear them out.
|
||||
set(AOM_CMAKE_FLAGS )
|
||||
else()
|
||||
set(AOM_GENERATOR "Unix Makefiles")
|
||||
if(NOT WIN32)
|
||||
set(AOM_CMAKE_FLAGS ${DEFAULT_CMAKE_FLAGS})
|
||||
endif()
|
||||
|
||||
|
@ -34,7 +27,7 @@ ExternalProject_Add(external_aom
|
|||
PATCH_COMMAND ${PATCH_CMD} --verbose -p 1 -N -d ${BUILD_DIR}/aom/src/external_aom < ${PATCH_DIR}/aom.diff
|
||||
CONFIGURE_COMMAND ${CONFIGURE_ENV} &&
|
||||
cd ${BUILD_DIR}/aom/src/external_aom-build/ &&
|
||||
${CMAKE_COMMAND} -G "${AOM_GENERATOR}" -DCMAKE_INSTALL_PREFIX=${LIBDIR}/aom ${AOM_CMAKE_FLAGS} ${AOM_EXTRA_ARGS} ${BUILD_DIR}/aom/src/external_aom/
|
||||
${CMAKE_COMMAND} -DCMAKE_INSTALL_PREFIX=${LIBDIR}/aom ${AOM_CMAKE_FLAGS} ${AOM_EXTRA_ARGS} ${BUILD_DIR}/aom/src/external_aom/
|
||||
BUILD_COMMAND ${CMAKE_COMMAND} --build .
|
||||
INSTALL_COMMAND ${CMAKE_COMMAND} --build . --target install
|
||||
INSTALL_DIR ${LIBDIR}/aom
|
||||
|
|
|
@ -1,3 +1,5 @@
|
|||
# SPDX-FileCopyrightText: 2012-2022 Blender Foundation
|
||||
#
|
||||
# SPDX-License-Identifier: GPL-2.0-or-later
|
||||
|
||||
set(BLOSC_EXTRA_ARGS
|
||||
|
|
|
@ -1,3 +1,5 @@
|
|||
# SPDX-FileCopyrightText: 2017-2022 Blender Foundation
|
||||
#
|
||||
# SPDX-License-Identifier: GPL-2.0-or-later
|
||||
|
||||
if(WIN32)
|
||||
|
|
|
@ -1,3 +1,5 @@
|
|||
# SPDX-FileCopyrightText: 2022 Blender Foundation
|
||||
#
|
||||
# SPDX-License-Identifier: GPL-2.0-or-later
|
||||
|
||||
set(BOOST_ADDRESS_MODEL 64)
|
||||
|
|
|
@ -1,3 +1,5 @@
|
|||
# SPDX-FileCopyrightText: 2002-2022 Blender Foundation
|
||||
#
|
||||
# SPDX-License-Identifier: GPL-2.0-or-later
|
||||
|
||||
set(BROTLI_EXTRA_ARGS
|
||||
|
|
|
@ -1,3 +1,5 @@
|
|||
# SPDX-FileCopyrightText: 2002-2022 Blender Foundation
|
||||
#
|
||||
# SPDX-License-Identifier: GPL-2.0-or-later
|
||||
|
||||
set(BZIP2_PREFIX "${LIBDIR}/bzip2")
|
||||
|
|
|
@ -1,3 +1,5 @@
|
|||
# SPDX-FileCopyrightText: 2019-2022 Blender Foundation
|
||||
#
|
||||
# SPDX-License-Identifier: GPL-2.0-or-later
|
||||
|
||||
if(UNIX)
|
||||
|
|
|
@ -1,3 +1,5 @@
|
|||
# SPDX-FileCopyrightText: 2022 Blender Foundation
|
||||
#
|
||||
# SPDX-License-Identifier: GPL-2.0-or-later
|
||||
|
||||
# CVE Check requirements
|
||||
|
|
|
@ -1,3 +1,5 @@
|
|||
# SPDX-FileCopyrightText: 2021-2023 Blender Foundation
|
||||
#
|
||||
# SPDX-License-Identifier: GPL-2.0-or-later
|
||||
|
||||
## Update and uncomment this in the release branch
|
||||
|
@ -106,7 +108,6 @@ download_source(FLAC)
|
|||
download_source(VPX)
|
||||
download_source(OPUS)
|
||||
download_source(X264)
|
||||
download_source(XVIDCORE)
|
||||
download_source(OPENJPEG)
|
||||
download_source(FFMPEG)
|
||||
download_source(FFTW)
|
||||
|
|
|
@ -1,3 +1,5 @@
|
|||
# SPDX-FileCopyrightText: 2022-2023 Blender Foundation
|
||||
#
|
||||
# SPDX-License-Identifier: GPL-2.0-or-later
|
||||
|
||||
# LLVM does not switch over to cpp17 until llvm 16 and building ealier versions with
|
||||
|
|
|
@ -1,3 +1,5 @@
|
|||
# SPDX-FileCopyrightText: 2022-2023 Blender Foundation
|
||||
#
|
||||
# SPDX-License-Identifier: GPL-2.0-or-later
|
||||
|
||||
# These are build time requirements for dpcpp
|
||||
|
|
|
@ -1,3 +1,5 @@
|
|||
# SPDX-FileCopyrightText: 2017-2023 Blender Foundation
|
||||
#
|
||||
# SPDX-License-Identifier: GPL-2.0-or-later
|
||||
|
||||
# Note the utility apps may use png/tiff/gif system libraries, but the
|
||||
|
|
|
@ -1,4 +1,7 @@
|
|||
# SPDX-FileCopyrightText: 2022-2023 Blender Foundation
|
||||
#
|
||||
# SPDX-License-Identifier: GPL-2.0-or-later
|
||||
|
||||
if(WIN32)
|
||||
set(EPOXY_LIB_TYPE shared)
|
||||
else()
|
||||
|
|
|
@ -1,3 +1,5 @@
|
|||
# SPDX-FileCopyrightText: 2002-2022 Blender Foundation
|
||||
#
|
||||
# SPDX-License-Identifier: GPL-2.0-or-later
|
||||
|
||||
set(EXPAT_EXTRA_ARGS
|
||||
|
|
|
@ -1,3 +1,5 @@
|
|||
# SPDX-FileCopyrightText: 2002-2022 Blender Foundation
|
||||
#
|
||||
# SPDX-License-Identifier: GPL-2.0-or-later
|
||||
|
||||
ExternalProject_Add(external_ffi
|
||||
|
|
|
@ -1,9 +1,13 @@
|
|||
# SPDX-FileCopyrightText: 2017-2023 Blender Foundation
|
||||
#
|
||||
# SPDX-License-Identifier: GPL-2.0-or-later
|
||||
|
||||
if(WIN32)
|
||||
set(temp_LIBDIR ${mingw_LIBDIR})
|
||||
else()
|
||||
if(NOT WIN32)
|
||||
set(temp_LIBDIR ${LIBDIR})
|
||||
set(LIBDIR_FLAG "-L")
|
||||
else()
|
||||
set(temp_LIBDIR ${msys2_LIBDIR})
|
||||
set(LIBDIR_FLAG "-LIBPATH:")
|
||||
endif()
|
||||
|
||||
set(FFMPEG_CFLAGS "\
|
||||
|
@ -15,28 +19,57 @@ set(FFMPEG_CFLAGS "\
|
|||
-I${temp_LIBDIR}/opus/include \
|
||||
-I${temp_LIBDIR}/vpx/include \
|
||||
-I${temp_LIBDIR}/x264/include \
|
||||
-I${temp_LIBDIR}/xvidcore/include \
|
||||
-I${temp_LIBDIR}/zlib/include \
|
||||
-I${temp_LIBDIR}/aom/include"
|
||||
)
|
||||
set(FFMPEG_LDFLAGS "\
|
||||
-L${temp_LIBDIR}/lame/lib \
|
||||
-L${temp_LIBDIR}/openjpeg/lib \
|
||||
-L${temp_LIBDIR}/ogg/lib \
|
||||
-L${temp_LIBDIR}/vorbis/lib \
|
||||
-L${temp_LIBDIR}/theora/lib \
|
||||
-L${temp_LIBDIR}/opus/lib \
|
||||
-L${temp_LIBDIR}/vpx/lib \
|
||||
-L${temp_LIBDIR}/x264/lib \
|
||||
-L${temp_LIBDIR}/xvidcore/lib \
|
||||
-L${temp_LIBDIR}/zlib/lib \
|
||||
-L${temp_LIBDIR}/aom/lib"
|
||||
${LIBDIR_FLAG}${temp_LIBDIR}/lame/lib \
|
||||
${LIBDIR_FLAG}${temp_LIBDIR}/openjpeg/lib \
|
||||
${LIBDIR_FLAG}${temp_LIBDIR}/ogg/lib \
|
||||
${LIBDIR_FLAG}${temp_LIBDIR}/vorbis/lib \
|
||||
${LIBDIR_FLAG}${temp_LIBDIR}/theora/lib \
|
||||
${LIBDIR_FLAG}${temp_LIBDIR}/opus/lib \
|
||||
${LIBDIR_FLAG}${temp_LIBDIR}/vpx/lib \
|
||||
${LIBDIR_FLAG}${temp_LIBDIR}/x264/lib \
|
||||
${LIBDIR_FLAG}${temp_LIBDIR}/zlib/lib \
|
||||
${LIBDIR_FLAG}${temp_LIBDIR}/aom/lib"
|
||||
)
|
||||
|
||||
set(FFMPEG_PATCH_FILE)
|
||||
|
||||
if(WIN32)
|
||||
set(FFMPEG_CFLAGS "\
|
||||
${FFMPEG_CFLAGS} \
|
||||
-I${temp_LIBDIR}/openjpeg_msvc/include/openjpeg-2.5 \
|
||||
-I${temp_LIBDIR}/opus/include/opus \
|
||||
-DOPJ_STATIC \
|
||||
-MD \
|
||||
-UHAVE_UNISTD_H")
|
||||
|
||||
set(FFMPEG_LDFLAGS "\
|
||||
${FFMPEG_LDFLAGS} \
|
||||
${LIBDIR_FLAG}${temp_LIBDIR}/openjpeg_msvc/lib \
|
||||
ucrt.lib")
|
||||
|
||||
# As we now use MSVC on windows, pkgconfig is not really a viable option for many packages
|
||||
# so this patch removes those checks in favour of looking for the libs directly.
|
||||
set(FFMPEG_PATCH_FILE ${PATCH_DIR}/ffmpeg_windows.diff)
|
||||
else()
|
||||
# OpenJpeg is compiled with pthread support on Linux, which is all fine and is what we
|
||||
# want for maximum runtime performance, but due to static nature of that library we
|
||||
# need to force ffmpeg to link against pthread, otherwise test program used by autoconf
|
||||
# will fail. This patch does that in a way that is compatible with multiple distributions.
|
||||
set(FFMPEG_PATCH_FILE ${PATCH_DIR}/ffmpeg.diff)
|
||||
endif()
|
||||
|
||||
set(FFMPEG_EXTRA_FLAGS
|
||||
--pkg-config-flags=--static
|
||||
--extra-cflags=${FFMPEG_CFLAGS}
|
||||
--extra-ldflags=${FFMPEG_LDFLAGS}
|
||||
)
|
||||
|
||||
set(FFMPEG_ENV)
|
||||
if(NOT WIN32)
|
||||
set(FFMPEG_ENV "PKG_CONFIG_PATH=\
|
||||
${temp_LIBDIR}/openjpeg/lib/pkgconfig:\
|
||||
${temp_LIBDIR}/x264/lib/pkgconfig:\
|
||||
|
@ -48,11 +81,11 @@ ${temp_LIBDIR}/openjpeg/lib/pkgconfig:\
|
|||
${temp_LIBDIR}/opus/lib/pkgconfig:\
|
||||
${temp_LIBDIR}/aom/lib/pkgconfig:"
|
||||
)
|
||||
endif()
|
||||
|
||||
unset(temp_LIBDIR)
|
||||
|
||||
if(WIN32)
|
||||
set(FFMPEG_ENV set ${FFMPEG_ENV} &&)
|
||||
set(FFMPEG_EXTRA_FLAGS
|
||||
${FFMPEG_EXTRA_FLAGS}
|
||||
--disable-static
|
||||
|
@ -61,7 +94,31 @@ if(WIN32)
|
|||
--disable-pthreads
|
||||
--enable-libopenjpeg
|
||||
--disable-mediafoundation
|
||||
--toolchain=msvc
|
||||
--target-os=win32
|
||||
--disable-inline-asm
|
||||
)
|
||||
|
||||
if(BLENDER_PLATFORM_ARM)
|
||||
set(FFMPEG_EXTRA_FLAGS
|
||||
${FFMPEG_EXTRA_FLAGS}
|
||||
--arch=aarch64
|
||||
--enable-cross-compile
|
||||
--as=armasm64
|
||||
)
|
||||
|
||||
set(GAS_PATH ${BUILD_DIR}/x264/src/external_x264/tools/)
|
||||
string(REPLACE "/" "\\" GAS_PATH ${GAS_PATH})
|
||||
set(ENV{PATH} "$ENV{PATH};${GAS_PATH}")
|
||||
else()
|
||||
set(FFMPEG_EXTRA_FLAGS
|
||||
${FFMPEG_EXTRA_FLAGS}
|
||||
--arch=x64
|
||||
--target-os=win32
|
||||
)
|
||||
endif()
|
||||
|
||||
set(FFMPEG_CONFIGURE_COMMAND ${CONFIGURE_ENV_MSVC})
|
||||
else()
|
||||
set(FFMPEG_EXTRA_FLAGS
|
||||
${FFMPEG_EXTRA_FLAGS}
|
||||
|
@ -69,6 +126,8 @@ else()
|
|||
--disable-shared
|
||||
--enable-libopenjpeg
|
||||
)
|
||||
|
||||
set(FFMPEG_CONFIGURE_COMMAND ${CONFIGURE_ENV_NO_PERL})
|
||||
endif()
|
||||
|
||||
if(APPLE)
|
||||
|
@ -88,13 +147,9 @@ ExternalProject_Add(external_ffmpeg
|
|||
URL file://${PACKAGE_DIR}/${FFMPEG_FILE}
|
||||
DOWNLOAD_DIR ${DOWNLOAD_DIR}
|
||||
URL_HASH ${FFMPEG_HASH_TYPE}=${FFMPEG_HASH}
|
||||
# OpenJpeg is compiled with pthread support on Linux, which is all fine and is what we
|
||||
# want for maximum runtime performance, but due to static nature of that library we
|
||||
# need to force ffmpeg to link against pthread, otherwise test program used by autoconf
|
||||
# will fail. This patch does that in a way that is compatible with multiple distributions.
|
||||
PATCH_COMMAND ${PATCH_CMD} --verbose -p 1 -N -d ${BUILD_DIR}/ffmpeg/src/external_ffmpeg < ${PATCH_DIR}/ffmpeg.diff
|
||||
PATCH_COMMAND ${PATCH_CMD} --verbose -p 1 -N -d ${BUILD_DIR}/ffmpeg/src/external_ffmpeg < ${FFMPEG_PATCH_FILE}
|
||||
PREFIX ${BUILD_DIR}/ffmpeg
|
||||
CONFIGURE_COMMAND ${CONFIGURE_ENV_NO_PERL} &&
|
||||
CONFIGURE_COMMAND ${FFMPEG_CONFIGURE_COMMAND} &&
|
||||
cd ${BUILD_DIR}/ffmpeg/src/external_ffmpeg/ &&
|
||||
${FFMPEG_ENV} ${CONFIGURE_COMMAND_NO_TARGET} ${FFMPEG_EXTRA_FLAGS}
|
||||
--disable-lzma
|
||||
|
@ -118,7 +173,6 @@ ExternalProject_Add(external_ffmpeg
|
|||
--enable-libmp3lame
|
||||
--disable-librtmp
|
||||
--enable-libx264
|
||||
--enable-libxvid
|
||||
--enable-libaom
|
||||
--disable-libopencore-amrnb
|
||||
--disable-libopencore-amrwb
|
||||
|
@ -144,8 +198,8 @@ ExternalProject_Add(external_ffmpeg
|
|||
--disable-outdev=alsa
|
||||
--disable-crystalhd
|
||||
--disable-sndio
|
||||
BUILD_COMMAND ${CONFIGURE_ENV_NO_PERL} && cd ${BUILD_DIR}/ffmpeg/src/external_ffmpeg/ && make -j${MAKE_THREADS}
|
||||
INSTALL_COMMAND ${CONFIGURE_ENV_NO_PERL} && cd ${BUILD_DIR}/ffmpeg/src/external_ffmpeg/ && make install
|
||||
BUILD_COMMAND ${FFMPEG_CONFIGURE_COMMAND} && cd ${BUILD_DIR}/ffmpeg/src/external_ffmpeg/ && make -j${MAKE_THREADS}
|
||||
INSTALL_COMMAND ${FFMPEG_CONFIGURE_COMMAND} && cd ${BUILD_DIR}/ffmpeg/src/external_ffmpeg/ && make install
|
||||
CMAKE_ARGS -DCMAKE_INSTALL_PREFIX=${LIBDIR}/ffmpeg ${DEFAULT_CMAKE_FLAGS}
|
||||
INSTALL_DIR ${LIBDIR}/ffmpeg
|
||||
)
|
||||
|
@ -157,8 +211,6 @@ endif()
|
|||
add_dependencies(
|
||||
external_ffmpeg
|
||||
external_zlib
|
||||
external_openjpeg
|
||||
external_xvidcore
|
||||
external_x264
|
||||
external_opus
|
||||
external_vpx
|
||||
|
@ -167,17 +219,21 @@ add_dependencies(
|
|||
external_ogg
|
||||
external_lame
|
||||
external_aom
|
||||
external_sndfile
|
||||
external_flac
|
||||
)
|
||||
if(WIN32)
|
||||
add_dependencies(
|
||||
external_ffmpeg
|
||||
external_zlib_mingw
|
||||
external_zlib
|
||||
external_openjpeg_msvc
|
||||
)
|
||||
endif()
|
||||
if(UNIX)
|
||||
add_dependencies(
|
||||
external_ffmpeg
|
||||
external_nasm
|
||||
external_openjpeg
|
||||
)
|
||||
endif()
|
||||
|
||||
|
|
|
@ -1,46 +1,55 @@
|
|||
# SPDX-FileCopyrightText: 2017-2023 Blender Foundation
|
||||
#
|
||||
# SPDX-License-Identifier: GPL-2.0-or-later
|
||||
|
||||
set(FFTW_EXTRA_ARGS)
|
||||
|
||||
macro(fftw_build FFTW_POSTFIX)
|
||||
if(WIN32)
|
||||
set(FFTW3_PATCH_COMMAND ${PATCH_CMD} --verbose -p 0 -N -d ${BUILD_DIR}/fftw3/src/external_fftw3_${FFTW_POSTFIX} < ${PATCH_DIR}/fftw3.diff)
|
||||
set(FFTW_EXTRA_ARGS --disable-static --enable-shared)
|
||||
set(FFTW_INSTALL install-strip)
|
||||
if("${FFTW_POSTFIX}" STREQUAL "float")
|
||||
set(FFTW_EXTRA_ARGS -DENABLE_FLOAT=ON)
|
||||
endif()
|
||||
|
||||
ExternalProject_Add(external_fftw3_${FFTW_POSTFIX}
|
||||
URL file://${PACKAGE_DIR}/${FFTW_FILE}
|
||||
DOWNLOAD_DIR ${DOWNLOAD_DIR}
|
||||
URL_HASH ${FFTW_HASH_TYPE}=${FFTW_HASH}
|
||||
PREFIX ${BUILD_DIR}/fftw3
|
||||
CMAKE_ARGS -DCMAKE_INSTALL_PREFIX=${LIBDIR}/fftw3 ${FFTW_EXTRA_ARGS}
|
||||
INSTALL_DIR ${LIBDIR}/fftw3
|
||||
)
|
||||
else()
|
||||
set(FFTW_EXTRA_ARGS --enable-static)
|
||||
set(FFTW_INSTALL install)
|
||||
ExternalProject_Add(external_fftw3_${FFTW_POSTFIX}
|
||||
URL file://${PACKAGE_DIR}/${FFTW_FILE}
|
||||
DOWNLOAD_DIR ${DOWNLOAD_DIR}
|
||||
URL_HASH ${FFTW_HASH_TYPE}=${FFTW_HASH}
|
||||
PREFIX ${BUILD_DIR}/fftw3
|
||||
CONFIGURE_COMMAND ${CONFIGURE_ENV} && cd ${BUILD_DIR}/fftw3/src/external_fftw3_${FFTW_POSTFIX}/ && ${CONFIGURE_COMMAND} ${FFTW_EXTRA_ARGS} ${ARGN} --prefix=${mingw_LIBDIR}/fftw3
|
||||
BUILD_COMMAND ${CONFIGURE_ENV} && cd ${BUILD_DIR}/fftw3/src/external_fftw3_${FFTW_POSTFIX}/ && make -j${MAKE_THREADS}
|
||||
INSTALL_COMMAND ${CONFIGURE_ENV} && cd ${BUILD_DIR}/fftw3/src/external_fftw3_${FFTW_POSTFIX}/ && make ${FFTW_INSTALL}
|
||||
INSTALL_DIR ${LIBDIR}/fftw3
|
||||
)
|
||||
endif()
|
||||
ExternalProject_Add(external_fftw3_${FFTW_POSTFIX}
|
||||
URL file://${PACKAGE_DIR}/${FFTW_FILE}
|
||||
DOWNLOAD_DIR ${DOWNLOAD_DIR}
|
||||
URL_HASH ${FFTW_HASH_TYPE}=${FFTW_HASH}
|
||||
PREFIX ${BUILD_DIR}/fftw3
|
||||
CONFIGURE_COMMAND ${CONFIGURE_ENV} && cd ${BUILD_DIR}/fftw3/src/external_fftw3_${FFTW_POSTFIX}/ && ${CONFIGURE_COMMAND} ${FFTW_EXTRA_ARGS} ${ARGN} --prefix=${mingw_LIBDIR}/fftw3
|
||||
PATCH_COMMAND ${FFTW3_PATCH_COMMAND}
|
||||
BUILD_COMMAND ${CONFIGURE_ENV} && cd ${BUILD_DIR}/fftw3/src/external_fftw3_${FFTW_POSTFIX}/ && make -j${MAKE_THREADS}
|
||||
INSTALL_COMMAND ${CONFIGURE_ENV} && cd ${BUILD_DIR}/fftw3/src/external_fftw3_${FFTW_POSTFIX}/ && make ${FFTW_INSTALL}
|
||||
INSTALL_DIR ${LIBDIR}/fftw3
|
||||
)
|
||||
endmacro()
|
||||
|
||||
fftw_build(double)
|
||||
fftw_build(float --enable-float)
|
||||
|
||||
if(MSVC)
|
||||
set_target_properties(external_fftw3_double PROPERTIES FOLDER Mingw)
|
||||
if(BUILD_MODE STREQUAL Release)
|
||||
ExternalProject_Add_Step(external_fftw3_double after_install
|
||||
COMMAND ${CMAKE_COMMAND} -E copy ${LIBDIR}/fftw3/lib/libfftw3.dll.a ${HARVEST_TARGET}/fftw3/lib/libfftw3-3.lib
|
||||
COMMAND ${CMAKE_COMMAND} -E copy ${LIBDIR}/fftw3/bin/libfftw3-3.dll ${HARVEST_TARGET}/fftw3/lib/libfftw3-3.dll
|
||||
COMMAND ${CMAKE_COMMAND} -E copy ${LIBDIR}/fftw3/lib/fftw3.lib ${HARVEST_TARGET}/fftw3/lib/fftw3.lib
|
||||
COMMAND ${CMAKE_COMMAND} -E copy ${LIBDIR}/fftw3/bin/fftw3.dll ${HARVEST_TARGET}/fftw3/lib/fftw3.dll
|
||||
COMMAND ${CMAKE_COMMAND} -E copy ${LIBDIR}/fftw3/include/fftw3.h ${HARVEST_TARGET}/fftw3/include/fftw3.h
|
||||
DEPENDEES install
|
||||
)
|
||||
ExternalProject_Add_Step(external_fftw3_float after_install
|
||||
COMMAND ${CMAKE_COMMAND} -E copy ${LIBDIR}/fftw3/lib/libfftw3f.dll.a ${HARVEST_TARGET}/fftw3/lib/libfftw3f.lib
|
||||
COMMAND ${CMAKE_COMMAND} -E copy ${LIBDIR}/fftw3/bin/libfftw3f-3.dll ${HARVEST_TARGET}/fftw3/lib/libfftw3f-3.dll
|
||||
COMMAND ${CMAKE_COMMAND} -E copy ${LIBDIR}/fftw3/lib/fftw3f.lib ${HARVEST_TARGET}/fftw3/lib/fftw3f.lib
|
||||
COMMAND ${CMAKE_COMMAND} -E copy ${LIBDIR}/fftw3/bin/fftw3f.dll ${HARVEST_TARGET}/fftw3/lib/fftw3f.dll
|
||||
DEPENDEES install
|
||||
)
|
||||
)
|
||||
endif()
|
||||
|
||||
|
||||
endif()
|
||||
|
|
|
@ -1,16 +1,47 @@
|
|||
# SPDX-FileCopyrightText: 2002-2023 Blender Foundation
|
||||
#
|
||||
# SPDX-License-Identifier: GPL-2.0-or-later
|
||||
|
||||
ExternalProject_Add(external_flac
|
||||
URL file://${PACKAGE_DIR}/${FLAC_FILE}
|
||||
DOWNLOAD_DIR ${DOWNLOAD_DIR}
|
||||
URL_HASH ${FLAC_HASH_TYPE}=${FLAC_HASH}
|
||||
PREFIX ${BUILD_DIR}/flac
|
||||
CONFIGURE_COMMAND ${CONFIGURE_ENV} && cd ${BUILD_DIR}/flac/src/external_flac/ && ${CONFIGURE_COMMAND} --prefix=${LIBDIR}/flac --disable-shared --enable-static
|
||||
BUILD_COMMAND ${CONFIGURE_ENV} && cd ${BUILD_DIR}/flac/src/external_flac/ && make -j${MAKE_THREADS}
|
||||
INSTALL_COMMAND ${CONFIGURE_ENV} && cd ${BUILD_DIR}/flac/src/external_flac/ && make install
|
||||
INSTALL_DIR ${LIBDIR}/flac
|
||||
)
|
||||
if(NOT WIN32)
|
||||
ExternalProject_Add(external_flac
|
||||
URL file://${PACKAGE_DIR}/${FLAC_FILE}
|
||||
DOWNLOAD_DIR ${DOWNLOAD_DIR}
|
||||
URL_HASH ${FLAC_HASH_TYPE}=${FLAC_HASH}
|
||||
PREFIX ${BUILD_DIR}/flac
|
||||
CONFIGURE_COMMAND ${CONFIGURE_ENV} && cd ${BUILD_DIR}/flac/src/external_flac/ && ${CONFIGURE_COMMAND} --prefix=${LIBDIR}/flac --disable-shared --enable-static
|
||||
BUILD_COMMAND ${CONFIGURE_ENV} && cd ${BUILD_DIR}/flac/src/external_flac/ && make -j${MAKE_THREADS}
|
||||
INSTALL_COMMAND ${CONFIGURE_ENV} && cd ${BUILD_DIR}/flac/src/external_flac/ && make install
|
||||
INSTALL_DIR ${LIBDIR}/flac
|
||||
)
|
||||
else()
|
||||
set(FLAC_CXX_FLAGS "-DFLAC__NO_DLL=ON")
|
||||
|
||||
set(FLAC_EXTRA_ARGS
|
||||
-DCMAKE_POLICY_DEFAULT_CMP0074=NEW
|
||||
-DBUILD_PROGRAMS=OFF
|
||||
-DBUILD_EXAMPLES=OFF
|
||||
-DBUILD_DOCS=OFF
|
||||
-DBUILD_TESTING=OFF
|
||||
-DINSTALL_MANPAGES=OFF
|
||||
-DOgg_ROOT=${LIBDIR}/ogg
|
||||
-DBUILD_SHARED_LIBS=OFF
|
||||
-DCMAKE_C_FLAGS_RELEASE=${FLAC_CXX_FLAGS}
|
||||
)
|
||||
|
||||
ExternalProject_Add(external_flac
|
||||
URL file://${PACKAGE_DIR}/${FLAC_FILE}
|
||||
DOWNLOAD_DIR ${DOWNLOAD_DIR}
|
||||
URL_HASH ${FLAC_HASH_TYPE}=${FLAC_HASH}
|
||||
PREFIX ${BUILD_DIR}/flac
|
||||
CMAKE_GENERATOR "Ninja"
|
||||
CMAKE_ARGS -DCMAKE_INSTALL_PREFIX=${LIBDIR}/flac ${DEFAULT_CMAKE_FLAGS} ${FLAC_EXTRA_ARGS}
|
||||
INSTALL_DIR ${LIBDIR}/flac
|
||||
)
|
||||
endif()
|
||||
|
||||
if(MSVC)
|
||||
set_target_properties(external_flac PROPERTIES FOLDER Mingw)
|
||||
add_dependencies(
|
||||
external_flac
|
||||
external_ogg
|
||||
)
|
||||
endif()
|
||||
|
|
|
@ -1,3 +1,5 @@
|
|||
# SPDX-FileCopyrightText: 2002-2022 Blender Foundation
|
||||
#
|
||||
# SPDX-License-Identifier: GPL-2.0-or-later
|
||||
|
||||
ExternalProject_Add(external_flex
|
||||
|
|
|
@ -1,3 +1,5 @@
|
|||
# SPDX-FileCopyrightText: 2002-2022 Blender Foundation
|
||||
#
|
||||
# SPDX-License-Identifier: GPL-2.0-or-later
|
||||
|
||||
set(FLEXBISON_EXTRA_ARGS)
|
||||
|
|
|
@ -1,3 +1,5 @@
|
|||
# SPDX-FileCopyrightText: 2022 Blender Foundation
|
||||
#
|
||||
# SPDX-License-Identifier: GPL-2.0-or-later
|
||||
|
||||
set(FMT_EXTRA_ARGS
|
||||
|
|
|
@ -1,3 +1,5 @@
|
|||
# SPDX-FileCopyrightText: 2012-2022 Blender Foundation
|
||||
#
|
||||
# SPDX-License-Identifier: GPL-2.0-or-later
|
||||
|
||||
if(WIN32)
|
||||
|
|
|
@ -1,3 +1,5 @@
|
|||
# SPDX-FileCopyrightText: 2002-2022 Blender Foundation
|
||||
#
|
||||
# SPDX-License-Identifier: GPL-2.0-or-later
|
||||
|
||||
set(FREETYPE_EXTRA_ARGS
|
||||
|
|
|
@ -1,3 +1,5 @@
|
|||
# SPDX-FileCopyrightText: 2022-2023 Blender Foundation
|
||||
#
|
||||
# SPDX-License-Identifier: GPL-2.0-or-later
|
||||
|
||||
if(WIN32)
|
||||
|
|
|
@ -1,3 +1,5 @@
|
|||
# SPDX-FileCopyrightText: 2022 Blender Foundation
|
||||
#
|
||||
# SPDX-License-Identifier: GPL-2.0-or-later
|
||||
|
||||
set(GMMLIB_EXTRA_ARGS
|
||||
|
|
|
@ -1,11 +1,28 @@
|
|||
# SPDX-FileCopyrightText: 2020-2023 Blender Foundation
|
||||
#
|
||||
# SPDX-License-Identifier: GPL-2.0-or-later
|
||||
|
||||
set(GMP_EXTRA_ARGS -enable-cxx)
|
||||
|
||||
if(WIN32)
|
||||
# Shared for windows because static libs will drag in a libgcc dependency.
|
||||
set(GMP_OPTIONS --disable-static --enable-shared --enable-fat --host=x86_64-w64-mingw32 --build=x86_64-w64-mingw32)
|
||||
cmake_to_msys_path("${BUILD_DIR}/gmp/src/external_gmp/compile" compilescript_path)
|
||||
|
||||
set(arlib_joint_path "ar-lib lib.exe")
|
||||
set(GMP_CFLAGS "-nologo -W3 -utf-8 -MP -MD -Z7 -Ob0 -Od -Xcompiler -RTC1 -DWIN32 -D_WINDOWS")
|
||||
set(GMP_CC_CXX "${compilescript_path} cl")
|
||||
set(GMP_NM "dumpbin.exe -symbols -headers")
|
||||
|
||||
set(GMP_CONFIGURE_ENV set AR=${arlib_joint_path} && set NM=${GMP_NM} && ${CONFIGURE_ENV_NO_PERL} && set CC=${GMP_CC_CXX} && set CXX=${GMP_CC_CXX} && set CFLAGS=${GMP_CFLAGS} && set AS=:)
|
||||
|
||||
set(GMP_OPTIONS --disable-static --enable-shared --enable-cxx --verbose gmp_cv_check_libm_for_build=no ac_cv_prog_LEX=: ac_cv_prog_YACC=: ac_cv_prog_ac_ct_STRIP=: ac_cv_prog_RANLIB=:)
|
||||
|
||||
if(BLENDER_PLATFORM_ARM)
|
||||
set(GMP_OPTIONS ${GMP_OPTIONS} --enable-assembly=no --build=aarch64-pc-mingw32)
|
||||
else()
|
||||
set(GMP_OPTIONS ${GMP_OPTIONS} --enable-assembly=no --build=x86_64-pc-mingw32 ac_cv_func_memset=yes gmp_cv_asm_w32=.word)
|
||||
endif()
|
||||
else()
|
||||
set(GMP_CONFIGURE_ENV ${CONFIGURE_ENV_NO_PERL})
|
||||
set(GMP_OPTIONS --enable-static --disable-shared )
|
||||
endif()
|
||||
|
||||
|
@ -36,37 +53,22 @@ ExternalProject_Add(external_gmp
|
|||
URL_HASH ${GMP_HASH_TYPE}=${GMP_HASH}
|
||||
PREFIX ${BUILD_DIR}/gmp
|
||||
PATCH_COMMAND ${PATCH_CMD} -p 1 -d ${BUILD_DIR}/gmp/src/external_gmp < ${PATCH_DIR}/gmp.diff
|
||||
CONFIGURE_COMMAND ${CONFIGURE_ENV_NO_PERL} && cd ${BUILD_DIR}/gmp/src/external_gmp/ && ${CONFIGURE_COMMAND} --prefix=${LIBDIR}/gmp ${GMP_OPTIONS} ${GMP_EXTRA_ARGS}
|
||||
CONFIGURE_COMMAND ${GMP_CONFIGURE_ENV} && cd ${BUILD_DIR}/gmp/src/external_gmp/ && ${CONFIGURE_COMMAND} --prefix=${LIBDIR}/gmp ${GMP_OPTIONS} ${GMP_EXTRA_ARGS}
|
||||
BUILD_COMMAND ${CONFIGURE_ENV_NO_PERL} && cd ${BUILD_DIR}/gmp/src/external_gmp/ && make -j${MAKE_THREADS}
|
||||
INSTALL_COMMAND ${CONFIGURE_ENV_NO_PERL} && cd ${BUILD_DIR}/gmp/src/external_gmp/ && make install
|
||||
INSTALL_DIR ${LIBDIR}/gmp
|
||||
)
|
||||
|
||||
if(MSVC)
|
||||
set_target_properties(external_gmp PROPERTIES FOLDER Mingw)
|
||||
endif()
|
||||
|
||||
if(BUILD_MODE STREQUAL Release AND WIN32)
|
||||
ExternalProject_Add_Step(external_gmp after_install
|
||||
COMMAND ${CMAKE_COMMAND} -E copy ${BUILD_DIR}/gmp/src/external_gmp/.libs/libgmp-3.dll.def ${BUILD_DIR}/gmp/src/external_gmp/.libs/libgmp-10.def
|
||||
COMMAND lib /def:${BUILD_DIR}/gmp/src/external_gmp/.libs/libgmp-10.def /machine:x64 /out:${BUILD_DIR}/gmp/src/external_gmp/.libs/libgmp-10.lib
|
||||
COMMAND ${CMAKE_COMMAND} -E copy ${LIBDIR}/gmp/bin/libgmp-10.dll ${HARVEST_TARGET}/gmp/lib/libgmp-10.dll
|
||||
COMMAND ${CMAKE_COMMAND} -E copy ${BUILD_DIR}/gmp/src/external_gmp/.libs/libgmp-10.lib ${HARVEST_TARGET}/gmp/lib/libgmp-10.lib
|
||||
COMMAND ${CMAKE_COMMAND} -E copy ${LIBDIR}/gmp/bin/gmp-10.dll ${HARVEST_TARGET}/gmp/lib/gmp-10.dll
|
||||
COMMAND ${CMAKE_COMMAND} -E copy ${LIBDIR}/gmp/lib/gmp.dll.lib ${HARVEST_TARGET}/gmp/lib/gmp.dll.lib
|
||||
COMMAND ${CMAKE_COMMAND} -E copy_directory ${LIBDIR}/gmp/include ${HARVEST_TARGET}/gmp/include
|
||||
|
||||
DEPENDEES install
|
||||
)
|
||||
endif()
|
||||
|
||||
if(BUILD_MODE STREQUAL Debug AND WIN32)
|
||||
ExternalProject_Add_Step(external_gmp after_install
|
||||
COMMAND ${CMAKE_COMMAND} -E copy ${BUILD_DIR}/gmp/src/external_gmp/.libs/libgmp-3.dll.def ${BUILD_DIR}/gmp/src/external_gmp/.libs/libgmp-10.def
|
||||
COMMAND lib /def:${BUILD_DIR}/gmp/src/external_gmp/.libs/libgmp-10.def /machine:x64 /out:${BUILD_DIR}/gmp/src/external_gmp/.libs/libgmp-10.lib
|
||||
|
||||
DEPENDEES install
|
||||
)
|
||||
endif()
|
||||
|
||||
if(WIN32)
|
||||
# gmpxx is somewhat special, it builds on top of the C style gmp library but exposes C++ bindings
|
||||
# given the C++ ABI between MSVC and mingw is not compatible, we need to build the bindings
|
||||
|
@ -78,10 +80,9 @@ if(WIN32)
|
|||
PREFIX ${BUILD_DIR}/gmpxx
|
||||
PATCH_COMMAND COMMAND ${CMAKE_COMMAND} -E copy ${PATCH_DIR}/cmakelists_gmpxx.txt ${BUILD_DIR}/gmpxx/src/external_gmpxx/CMakeLists.txt &&
|
||||
${CMAKE_COMMAND} -E copy ${PATCH_DIR}/config_gmpxx.h ${BUILD_DIR}/gmpxx/src/external_gmpxx/config.h
|
||||
CMAKE_ARGS -DCMAKE_INSTALL_PREFIX=${LIBDIR}/gmpxx ${DEFAULT_CMAKE_FLAGS} -DGMP_LIBRARY=${BUILD_DIR}/gmp/src/external_gmp/.libs/libgmp-10.lib -DGMP_INCLUDE_DIR=${BUILD_DIR}/gmp/src/external_gmp -DCMAKE_DEBUG_POSTFIX=_d
|
||||
CMAKE_ARGS -DCMAKE_INSTALL_PREFIX=${LIBDIR}/gmpxx ${DEFAULT_CMAKE_FLAGS} -DGMP_LIBRARY=${BUILD_DIR}/gmp/src/external_gmp/.libs/gmp.dll.lib -DGMP_INCLUDE_DIR=${BUILD_DIR}/gmp/src/external_gmp -DCMAKE_DEBUG_POSTFIX=_d
|
||||
INSTALL_DIR ${LIBDIR}/gmpxx
|
||||
)
|
||||
set_target_properties(external_gmpxx PROPERTIES FOLDER Mingw)
|
||||
|
||||
add_dependencies(
|
||||
external_gmpxx
|
||||
|
|
|
@ -1,3 +1,5 @@
|
|||
# SPDX-FileCopyrightText: 2022-2023 Blender Foundation
|
||||
#
|
||||
# SPDX-License-Identifier: GPL-2.0-or-later
|
||||
|
||||
if(WIN32)
|
||||
|
|
|
@ -1,3 +1,5 @@
|
|||
# SPDX-FileCopyrightText: 2017-2022 Blender Foundation
|
||||
#
|
||||
# SPDX-License-Identifier: GPL-2.0-or-later
|
||||
|
||||
set(HARU_EXTRA_ARGS
|
||||
|
|
|
@ -1,3 +1,5 @@
|
|||
# SPDX-FileCopyrightText: 2017-2023 Blender Foundation
|
||||
#
|
||||
# SPDX-License-Identifier: GPL-2.0-or-later
|
||||
|
||||
########################################################################
|
||||
|
@ -262,7 +264,6 @@ else()
|
|||
harvest(opus/lib ffmpeg/lib "*.a")
|
||||
harvest(vpx/lib ffmpeg/lib "*.a")
|
||||
harvest(x264/lib ffmpeg/lib "*.a")
|
||||
harvest(xvidcore/lib ffmpeg/lib "*.a")
|
||||
harvest(aom/lib ffmpeg/lib "*.a")
|
||||
harvest(webp/lib webp/lib "*.a")
|
||||
harvest(webp/include webp/include "*.h")
|
||||
|
|
|
@ -1,3 +1,5 @@
|
|||
# SPDX-FileCopyrightText: 2002-2022 Blender Foundation
|
||||
#
|
||||
# SPDX-License-Identifier: GPL-2.0-or-later
|
||||
|
||||
set(ICONV_EXTRA_ARGS)
|
||||
|
|
|
@ -1,3 +1,5 @@
|
|||
# SPDX-FileCopyrightText: 2022-2023 Blender Foundation
|
||||
#
|
||||
# SPDX-License-Identifier: GPL-2.0-or-later
|
||||
|
||||
unpack_only(igc_vcintrinsics)
|
||||
|
|
|
@ -1,3 +1,5 @@
|
|||
# SPDX-FileCopyrightText: 2022 Blender Foundation
|
||||
#
|
||||
# SPDX-License-Identifier: GPL-2.0-or-later
|
||||
|
||||
set(IMATH_EXTRA_ARGS
|
||||
|
|
|
@ -1,10 +1,12 @@
|
|||
# SPDX-FileCopyrightText: 2020-2023 Blender Foundation
|
||||
#
|
||||
# SPDX-License-Identifier: GPL-2.0-or-later
|
||||
|
||||
if(WIN32)
|
||||
set(ISPC_EXTRA_ARGS_WIN
|
||||
-DFLEX_EXECUTABLE=${LIBDIR}/flexbison/win_flex.exe
|
||||
-DBISON_EXECUTABLE=${LIBDIR}/flexbison/win_bison.exe
|
||||
-DM4_EXECUTABLE=${DOWNLOAD_DIR}/mingw/mingw64/msys/1.0/bin/m4.exe
|
||||
-DM4_EXECUTABLE=${DOWNLOAD_DIR}/msys2/msys64/usr/bin/m4.exe
|
||||
-DARM_ENABLED=Off
|
||||
-DPython3_FIND_REGISTRY=NEVER
|
||||
)
|
||||
|
|
|
@ -1,3 +1,5 @@
|
|||
# SPDX-FileCopyrightText: 2006-2022 Blender Foundation
|
||||
#
|
||||
# SPDX-License-Identifier: GPL-2.0-or-later
|
||||
|
||||
ExternalProject_Add(external_jemalloc
|
||||
|
|
|
@ -1,3 +1,5 @@
|
|||
# SPDX-FileCopyrightText: 2017-2022 Blender Foundation
|
||||
#
|
||||
# SPDX-License-Identifier: GPL-2.0-or-later
|
||||
|
||||
if(WIN32)
|
||||
|
|
|
@ -1,18 +1,17 @@
|
|||
# SPDX-FileCopyrightText: 2017-2023 Blender Foundation
|
||||
#
|
||||
# SPDX-License-Identifier: GPL-2.0-or-later
|
||||
|
||||
set(LAME_EXTRA_ARGS)
|
||||
if(MSVC)
|
||||
if("${CMAKE_SIZEOF_VOID_P}" EQUAL "4")
|
||||
set(LAME_EXTRA_ARGS CFLAGS=-msse)
|
||||
endif()
|
||||
endif()
|
||||
|
||||
ExternalProject_Add(external_lame
|
||||
URL file://${PACKAGE_DIR}/${LAME_FILE}
|
||||
DOWNLOAD_DIR ${DOWNLOAD_DIR}
|
||||
URL_HASH ${LAME_HASH_TYPE}=${LAME_HASH}
|
||||
PREFIX ${BUILD_DIR}/lame
|
||||
CONFIGURE_COMMAND ${CONFIGURE_ENV} && cd ${BUILD_DIR}/lame/src/external_lame/ && ${CONFIGURE_COMMAND} --prefix=${LIBDIR}/lame --disable-shared --enable-static ${LAME_EXTRA_ARGS}
|
||||
set(LAME_ARCH Win64)
|
||||
set (LAME_CONFIGURE echo .)
|
||||
set (LAME_BUILD cd ${BUILD_DIR}/lame/src/external_lame/ && nmake /F MakeFile.msvc MSVCVER=${LAME_ARCH} all)
|
||||
set (LAME_INSTALL cd ${BUILD_DIR}/lame/src/external_lame/ &&
|
||||
${CMAKE_COMMAND} -E copy include/lame.h ${LIBDIR}/lame/include/lame/lame.h &&
|
||||
${CMAKE_COMMAND} -E copy output/libmp3lame-static.lib ${LIBDIR}/lame/lib/mp3lame.lib )
|
||||
else()
|
||||
set(LAME_CONFIGURE ${CONFIGURE_ENV} && cd ${BUILD_DIR}/lame/src/external_lame/ && ${CONFIGURE_COMMAND} --prefix=${LIBDIR}/lame --disable-shared --enable-static ${LAME_EXTRA_ARGS}
|
||||
--enable-export=full
|
||||
--with-fileio=sndfile
|
||||
--without-vorbis
|
||||
|
@ -20,12 +19,19 @@ ExternalProject_Add(external_lame
|
|||
--disable-mp3x
|
||||
--disable-mp3rtp
|
||||
--disable-gtktest
|
||||
--disable-frontend
|
||||
BUILD_COMMAND ${CONFIGURE_ENV} && cd ${BUILD_DIR}/lame/src/external_lame/ && make -j${MAKE_THREADS}
|
||||
INSTALL_COMMAND ${CONFIGURE_ENV} && cd ${BUILD_DIR}/lame/src/external_lame/ && make install
|
||||
--disable-frontend)
|
||||
set(LAME_BUILD ${CONFIGURE_ENV} && cd ${BUILD_DIR}/lame/src/external_lame/ && make -j${MAKE_THREADS})
|
||||
set(LAME_INSTALL ${CONFIGURE_ENV} && cd ${BUILD_DIR}/lame/src/external_lame/ && make install)
|
||||
endif()
|
||||
|
||||
ExternalProject_Add(external_lame
|
||||
URL file://${PACKAGE_DIR}/${LAME_FILE}
|
||||
DOWNLOAD_DIR ${DOWNLOAD_DIR}
|
||||
URL_HASH ${LAME_HASH_TYPE}=${LAME_HASH}
|
||||
PREFIX ${BUILD_DIR}/lame
|
||||
PATCH_COMMAND COMMAND ${PATCH_CMD} -p 1 -d ${BUILD_DIR}/lame/src/external_lame < ${PATCH_DIR}/lame.diff
|
||||
CONFIGURE_COMMAND ${LAME_CONFIGURE}
|
||||
BUILD_COMMAND ${LAME_BUILD}
|
||||
INSTALL_COMMAND ${LAME_INSTALL}
|
||||
INSTALL_DIR ${LIBDIR}/lame
|
||||
)
|
||||
|
||||
if(MSVC)
|
||||
set_target_properties(external_lame PROPERTIES FOLDER Mingw)
|
||||
endif()
|
||||
|
|
|
@ -1,3 +1,5 @@
|
|||
# SPDX-FileCopyrightText: 2022 Blender Foundation
|
||||
#
|
||||
# SPDX-License-Identifier: GPL-2.0-or-later
|
||||
|
||||
set(LEVEL_ZERO_EXTRA_ARGS
|
||||
|
|
|
@ -1,3 +1,5 @@
|
|||
# SPDX-FileCopyrightText: 2019-2022 Blender Foundation
|
||||
#
|
||||
# SPDX-License-Identifier: GPL-2.0-or-later
|
||||
|
||||
set(LIBGLU_CFLAGS "-static-libgcc")
|
||||
|
|
|
@ -1,3 +1,5 @@
|
|||
# SPDX-FileCopyrightText: 2012-2023 Blender Foundation
|
||||
#
|
||||
# SPDX-License-Identifier: GPL-2.0-or-later
|
||||
|
||||
if(BLENDER_PLATFORM_ARM)
|
||||
|
|
|
@ -1,3 +1,5 @@
|
|||
# SPDX-FileCopyrightText: 2002-2022 Blender Foundation
|
||||
#
|
||||
# SPDX-License-Identifier: GPL-2.0-or-later
|
||||
|
||||
set(LZMA_PATCH_CMD echo .)
|
||||
|
|
|
@ -1,3 +1,5 @@
|
|||
# SPDX-FileCopyrightText: 2022 Blender Foundation
|
||||
#
|
||||
# SPDX-License-Identifier: GPL-2.0-or-later
|
||||
|
||||
# shorthand to only unpack a certain dependency
|
||||
|
|
|
@ -1,3 +1,5 @@
|
|||
# SPDX-FileCopyrightText: 2022-2023 Blender Foundation
|
||||
#
|
||||
# SPDX-License-Identifier: GPL-2.0-or-later
|
||||
|
||||
set(MATERIALX_EXTRA_ARGS
|
||||
|
|
|
@ -1,3 +1,5 @@
|
|||
# SPDX-FileCopyrightText: 2019-2023 Blender Foundation
|
||||
#
|
||||
# SPDX-License-Identifier: GPL-2.0-or-later
|
||||
|
||||
set(MESA_CFLAGS "-static-libgcc")
|
||||
|
|
|
@ -1,3 +1,5 @@
|
|||
# SPDX-FileCopyrightText: 2022 Blender Foundation
|
||||
#
|
||||
# SPDX-License-Identifier: GPL-2.0-or-later
|
||||
|
||||
set(MINIZIPNG_EXTRA_ARGS
|
||||
|
|
|
@ -1,3 +1,5 @@
|
|||
# SPDX-FileCopyrightText: 2002-2022 Blender Foundation
|
||||
#
|
||||
# SPDX-License-Identifier: GPL-2.0-or-later
|
||||
|
||||
ExternalProject_Add(external_nasm
|
||||
|
|
|
@ -1,3 +1,5 @@
|
|||
# SPDX-FileCopyrightText: 2017-2022 Blender Foundation
|
||||
#
|
||||
# SPDX-License-Identifier: GPL-2.0-or-later
|
||||
|
||||
if(MSVC)
|
||||
|
|
|
@ -1,3 +1,5 @@
|
|||
# SPDX-FileCopyrightText: 2022 Blender Foundation
|
||||
#
|
||||
# SPDX-License-Identifier: GPL-2.0-or-later
|
||||
|
||||
set(OCLOC_EXTRA_ARGS
|
||||
|
|
|
@ -1,17 +1,26 @@
|
|||
# SPDX-FileCopyrightText: 2002-2023 Blender Foundation
|
||||
#
|
||||
# SPDX-License-Identifier: GPL-2.0-or-later
|
||||
|
||||
ExternalProject_Add(external_ogg
|
||||
URL file://${PACKAGE_DIR}/${OGG_FILE}
|
||||
DOWNLOAD_DIR ${DOWNLOAD_DIR}
|
||||
URL_HASH ${OGG_HASH_TYPE}=${OGG_HASH}
|
||||
PREFIX ${BUILD_DIR}/ogg
|
||||
PATCH_COMMAND ${PATCH_CMD} --verbose -p 1 -N -d ${BUILD_DIR}/ogg/src/external_ogg < ${PATCH_DIR}/ogg.diff
|
||||
CONFIGURE_COMMAND ${CONFIGURE_ENV} && cd ${BUILD_DIR}/ogg/src/external_ogg/ && ${CONFIGURE_COMMAND} --prefix=${LIBDIR}/ogg --disable-shared --enable-static
|
||||
BUILD_COMMAND ${CONFIGURE_ENV} && cd ${BUILD_DIR}/ogg/src/external_ogg/ && make -j${MAKE_THREADS}
|
||||
INSTALL_COMMAND ${CONFIGURE_ENV} && cd ${BUILD_DIR}/ogg/src/external_ogg/ && make install
|
||||
INSTALL_DIR ${LIBDIR}/ogg
|
||||
)
|
||||
|
||||
if(MSVC)
|
||||
set_target_properties(external_ogg PROPERTIES FOLDER Mingw)
|
||||
if(NOT WIN32)
|
||||
ExternalProject_Add(external_ogg
|
||||
URL file://${PACKAGE_DIR}/${OGG_FILE}
|
||||
DOWNLOAD_DIR ${DOWNLOAD_DIR}
|
||||
URL_HASH ${OGG_HASH_TYPE}=${OGG_HASH}
|
||||
PREFIX ${BUILD_DIR}/ogg
|
||||
PATCH_COMMAND ${PATCH_CMD} --verbose -p 1 -N -d ${BUILD_DIR}/ogg/src/external_ogg < ${PATCH_DIR}/ogg.diff
|
||||
CONFIGURE_COMMAND ${CONFIGURE_ENV} && cd ${BUILD_DIR}/ogg/src/external_ogg/ && ${CONFIGURE_COMMAND} --prefix=${LIBDIR}/ogg --disable-shared --enable-static
|
||||
BUILD_COMMAND ${CONFIGURE_ENV} && cd ${BUILD_DIR}/ogg/src/external_ogg/ && make -j${MAKE_THREADS}
|
||||
INSTALL_COMMAND ${CONFIGURE_ENV} && cd ${BUILD_DIR}/ogg/src/external_ogg/ && make install
|
||||
INSTALL_DIR ${LIBDIR}/ogg
|
||||
)
|
||||
else()
|
||||
ExternalProject_Add(external_ogg
|
||||
URL file://${PACKAGE_DIR}/${OGG_FILE}
|
||||
DOWNLOAD_DIR ${DOWNLOAD_DIR}
|
||||
URL_HASH ${OGG_HASH_TYPE}=${OGG_HASH}
|
||||
PREFIX ${BUILD_DIR}/ogg
|
||||
CMAKE_ARGS -DCMAKE_INSTALL_PREFIX=${LIBDIR}/ogg ${DEFAULT_CMAKE_FLAGS}
|
||||
INSTALL_DIR ${LIBDIR}/ogg
|
||||
)
|
||||
endif()
|
||||
|
|
|
@ -1,3 +1,5 @@
|
|||
# SPDX-FileCopyrightText: 2002-2022 Blender Foundation
|
||||
#
|
||||
# SPDX-License-Identifier: GPL-2.0-or-later
|
||||
|
||||
if(BUILD_MODE STREQUAL Release)
|
||||
|
|
|
@ -1,3 +1,5 @@
|
|||
# SPDX-FileCopyrightText: 2002-2022 Blender Foundation
|
||||
#
|
||||
# SPDX-License-Identifier: GPL-2.0-or-later
|
||||
|
||||
if(UNIX)
|
||||
|
|
|
@ -1,3 +1,5 @@
|
|||
# SPDX-FileCopyrightText: 2017-2022 Blender Foundation
|
||||
#
|
||||
# SPDX-License-Identifier: GPL-2.0-or-later
|
||||
|
||||
set(OPENCOLORIO_EXTRA_ARGS
|
||||
|
|
|
@ -1,3 +1,5 @@
|
|||
# SPDX-FileCopyrightText: 2017-2023 Blender Foundation
|
||||
#
|
||||
# SPDX-License-Identifier: GPL-2.0-or-later
|
||||
|
||||
if(WIN32)
|
||||
|
|
|
@ -1,3 +1,5 @@
|
|||
# SPDX-FileCopyrightText: 2019-2022 Blender Foundation
|
||||
#
|
||||
# SPDX-License-Identifier: GPL-2.0-or-later
|
||||
|
||||
|
||||
|
|
|
@ -1,3 +1,5 @@
|
|||
# SPDX-FileCopyrightText: 2017-2023 Blender Foundation
|
||||
#
|
||||
# SPDX-License-Identifier: GPL-2.0-or-later
|
||||
|
||||
if(BUILD_MODE STREQUAL Release)
|
||||
|
@ -107,7 +109,8 @@ ExternalProject_Add(external_openimageio
|
|||
PREFIX ${BUILD_DIR}/openimageio
|
||||
PATCH_COMMAND ${PATCH_CMD} -p 1 -N -d ${BUILD_DIR}/openimageio/src/external_openimageio/ < ${PATCH_DIR}/openimageio.diff &&
|
||||
${PATCH_CMD} -p 1 -N -d ${BUILD_DIR}/openimageio/src/external_openimageio/ < ${PATCH_DIR}/oiio_3832.diff &&
|
||||
${PATCH_CMD} -p 1 -N -d ${BUILD_DIR}/openimageio/src/external_openimageio/ < ${PATCH_DIR}/oiio_deadlock.diff
|
||||
${PATCH_CMD} -p 1 -N -d ${BUILD_DIR}/openimageio/src/external_openimageio/ < ${PATCH_DIR}/oiio_deadlock.diff &&
|
||||
${PATCH_CMD} -p 1 -N -d ${BUILD_DIR}/openimageio/src/external_openimageio/ < ${PATCH_DIR}/oiio_psd_8da473e254.diff
|
||||
CMAKE_ARGS -DCMAKE_INSTALL_PREFIX=${LIBDIR}/openimageio ${DEFAULT_CMAKE_FLAGS} ${OPENIMAGEIO_EXTRA_ARGS}
|
||||
INSTALL_DIR ${LIBDIR}/openimageio
|
||||
)
|
||||
|
|
|
@ -1,38 +1,36 @@
|
|||
# SPDX-FileCopyrightText: 2017-2023 Blender Foundation
|
||||
#
|
||||
# SPDX-License-Identifier: GPL-2.0-or-later
|
||||
|
||||
# Note the encoder/decoder may use png/tiff/lcms system libraries, but the
|
||||
# library itself does not depend on them, so should give no problems.
|
||||
|
||||
if(WIN32)
|
||||
set(OPENJPEG_EXTRA_ARGS -G "MSYS Makefiles" -DBUILD_PKGCONFIG_FILES=On)
|
||||
else()
|
||||
if(NOT WIN32)
|
||||
set(OPENJPEG_EXTRA_ARGS ${DEFAULT_CMAKE_FLAGS})
|
||||
endif()
|
||||
|
||||
set(OPENJPEG_EXTRA_ARGS
|
||||
${OPENJPEG_EXTRA_ARGS}
|
||||
-DBUILD_SHARED_LIBS=OFF
|
||||
-DBUILD_CODEC=OFF
|
||||
)
|
||||
set(OPENJPEG_EXTRA_ARGS
|
||||
${OPENJPEG_EXTRA_ARGS}
|
||||
-DBUILD_SHARED_LIBS=OFF
|
||||
-DBUILD_CODEC=OFF
|
||||
)
|
||||
|
||||
ExternalProject_Add(external_openjpeg
|
||||
URL file://${PACKAGE_DIR}/${OPENJPEG_FILE}
|
||||
DOWNLOAD_DIR ${DOWNLOAD_DIR}
|
||||
URL_HASH ${OPENJPEG_HASH_TYPE}=${OPENJPEG_HASH}
|
||||
PREFIX ${BUILD_DIR}/openjpeg
|
||||
CONFIGURE_COMMAND ${CONFIGURE_ENV} && cd ${BUILD_DIR}/openjpeg/src/external_openjpeg-build && ${CMAKE_COMMAND} ${OPENJPEG_EXTRA_ARGS} -DCMAKE_INSTALL_PREFIX=${LIBDIR}/openjpeg ${BUILD_DIR}/openjpeg/src/external_openjpeg
|
||||
BUILD_COMMAND ${CONFIGURE_ENV} && cd ${BUILD_DIR}/openjpeg/src/external_openjpeg-build/ && make -j${MAKE_THREADS}
|
||||
INSTALL_COMMAND ${CONFIGURE_ENV} && cd ${BUILD_DIR}/openjpeg/src/external_openjpeg-build/ && make install
|
||||
INSTALL_DIR ${LIBDIR}/openjpeg
|
||||
)
|
||||
|
||||
# On windows ffmpeg wants a mingw build, while oiio needs a msvc build.
|
||||
if(MSVC)
|
||||
ExternalProject_Add(external_openjpeg
|
||||
URL file://${PACKAGE_DIR}/${OPENJPEG_FILE}
|
||||
DOWNLOAD_DIR ${DOWNLOAD_DIR}
|
||||
URL_HASH ${OPENJPEG_HASH_TYPE}=${OPENJPEG_HASH}
|
||||
PREFIX ${BUILD_DIR}/openjpeg
|
||||
CONFIGURE_COMMAND ${CONFIGURE_ENV} && cd ${BUILD_DIR}/openjpeg/src/external_openjpeg-build && ${CMAKE_COMMAND} ${OPENJPEG_EXTRA_ARGS} -DCMAKE_INSTALL_PREFIX=${LIBDIR}/openjpeg ${BUILD_DIR}/openjpeg/src/external_openjpeg
|
||||
BUILD_COMMAND ${CONFIGURE_ENV} && cd ${BUILD_DIR}/openjpeg/src/external_openjpeg-build/ && make -j${MAKE_THREADS}
|
||||
INSTALL_COMMAND ${CONFIGURE_ENV} && cd ${BUILD_DIR}/openjpeg/src/external_openjpeg-build/ && make install
|
||||
INSTALL_DIR ${LIBDIR}/openjpeg
|
||||
)
|
||||
else()
|
||||
set(OPENJPEG_EXTRA_ARGS ${DEFAULT_CMAKE_FLAGS})
|
||||
ExternalProject_Add(external_openjpeg_msvc
|
||||
URL file://${PACKAGE_DIR}/${OPENJPEG_FILE}
|
||||
DOWNLOAD_DIR ${DOWNLOAD_DIR}
|
||||
URL_HASH ${OPENJPEG_HASH_TYPE}=${OPENJPEG_HASH}
|
||||
PATCH_COMMAND ${PATCH_CMD} -p 1 -d ${BUILD_DIR}/openjpeg_msvc/src/external_openjpeg_msvc < ${PATCH_DIR}/openjpeg_msvc.diff
|
||||
PREFIX ${BUILD_DIR}/openjpeg_msvc
|
||||
CMAKE_ARGS ${OPENJPEG_EXTRA_ARGS} -DCMAKE_INSTALL_PREFIX=${LIBDIR}/openjpeg_msvc -DBUILD_SHARED_LIBS=Off -DBUILD_THIRDPARTY=OFF
|
||||
INSTALL_DIR ${LIBDIR}/openjpeg_msvc
|
||||
|
@ -45,10 +43,7 @@ if(MSVC)
|
|||
|
||||
DEPENDEES install
|
||||
)
|
||||
endif()
|
||||
endif()
|
||||
endif()
|
||||
|
||||
set(OPENJPEG_LIBRARY libopenjp2${LIBEXT})
|
||||
if(MSVC)
|
||||
set_target_properties(external_openjpeg PROPERTIES FOLDER Mingw)
|
||||
endif()
|
||||
|
|
|
@ -1,3 +1,5 @@
|
|||
# SPDX-FileCopyrightText: 2002-2022 Blender Foundation
|
||||
#
|
||||
# SPDX-License-Identifier: GPL-2.0-or-later
|
||||
|
||||
if(APPLE)
|
||||
|
|
|
@ -1,3 +1,5 @@
|
|||
# SPDX-FileCopyrightText: 2022 Blender Foundation
|
||||
#
|
||||
# SPDX-License-Identifier: GPL-2.0-or-later
|
||||
|
||||
# Note the utility apps may use png/tiff/gif system libraries, but the
|
||||
|
|
|
@ -1,3 +1,5 @@
|
|||
# SPDX-FileCopyrightText: 2017-2023 Blender Foundation
|
||||
#
|
||||
# SPDX-License-Identifier: GPL-2.0-or-later
|
||||
|
||||
set(OPENSUBDIV_EXTRA_ARGS
|
||||
|
|
|
@ -1,3 +1,5 @@
|
|||
# SPDX-FileCopyrightText: 2017-2023 Blender Foundation
|
||||
#
|
||||
# SPDX-License-Identifier: GPL-2.0-or-later
|
||||
|
||||
if(BUILD_MODE STREQUAL Debug)
|
||||
|
|
|
@ -1,7 +1,9 @@
|
|||
# SPDX-FileCopyrightText: 2017-2023 Blender Foundation
|
||||
#
|
||||
# SPDX-License-Identifier: GPL-2.0-or-later
|
||||
|
||||
if(WIN32)
|
||||
option(ENABLE_MINGW64 "Enable building of ffmpeg/iconv/libsndfile/fftw3 by installing mingw64" ON)
|
||||
option(ENABLE_MSYS2 "Enable building of ffmpeg/libsndfile/fftw3/gmp by installing msys2" ON)
|
||||
endif()
|
||||
option(FORCE_CHECK_HASH "Force a check of all hashses during CMake the configure phase" OFF)
|
||||
|
||||
|
@ -39,7 +41,7 @@ message("PATCH_DIR = ${PATCH_DIR}")
|
|||
message("BUILD_DIR = ${BUILD_DIR}")
|
||||
|
||||
if(WIN32)
|
||||
set(PATCH_CMD ${DOWNLOAD_DIR}/mingw/mingw64/msys/1.0/bin/patch.exe)
|
||||
set(PATCH_CMD ${DOWNLOAD_DIR}/msys2/msys64/usr/bin/patch.exe)
|
||||
set(LIBEXT ".lib")
|
||||
set(SHAREDLIBEXT ".lib")
|
||||
set(LIBPREFIX "")
|
||||
|
@ -99,11 +101,14 @@ if(WIN32)
|
|||
set(PLATFORM_CXX_FLAGS)
|
||||
set(PLATFORM_CMAKE_FLAGS)
|
||||
|
||||
set(MINGW_PATH ${DOWNLOAD_DIR}/mingw/mingw64)
|
||||
set(MINGW_PATH ${DOWNLOAD_DIR}/msys2/msys64/)
|
||||
set(MINGW_SHELL ming64sh.cmd)
|
||||
set(PERL_SHELL ${DOWNLOAD_DIR}/perl/portableshell.bat)
|
||||
set(MINGW_HOST x86_64-w64-mingw32)
|
||||
|
||||
set(MINGW_CFLAGS)
|
||||
set(MINGW_LDFLAGS)
|
||||
|
||||
# some build systems like meson will respect the *nix like environment vars
|
||||
# like CFLAGS and LDFlags but will still build with the MSVC compiler, so for
|
||||
# those we need to empty out the gcc style flags that are normally in there.
|
||||
|
@ -121,16 +126,21 @@ if(WIN32)
|
|||
call ${PERL_SHELL} &&
|
||||
call ${MINGW_SHELL} &&
|
||||
set path &&
|
||||
set CFLAGS=-g &&
|
||||
set LDFLAGS=-Wl,--as-needed -static-libgcc
|
||||
set CC=cl &&
|
||||
set CXX=cl &&
|
||||
set CFLAGS=${MINGW_CFLAGS} &&
|
||||
set LDFLAGS=${MINGW_LDFLAGS}
|
||||
)
|
||||
|
||||
set(CONFIGURE_ENV_NO_PERL
|
||||
cd ${MINGW_PATH} &&
|
||||
call ${MINGW_SHELL} &&
|
||||
set path &&
|
||||
set CFLAGS=-g &&
|
||||
set LDFLAGS=-Wl,--as-needed -static-libgcc
|
||||
set CC=cl &&
|
||||
set CXX=cl &&
|
||||
set LD=link &&
|
||||
set CFLAGS=${MINGW_CFLAGS} &&
|
||||
set LDFLAGS=${MINGW_LDFLAGS}
|
||||
)
|
||||
|
||||
set(CONFIGURE_COMMAND sh ./configure)
|
||||
|
|
|
@ -1,20 +1,38 @@
|
|||
# SPDX-FileCopyrightText: 2002-2023 Blender Foundation
|
||||
#
|
||||
# SPDX-License-Identifier: GPL-2.0-or-later
|
||||
|
||||
ExternalProject_Add(external_opus
|
||||
URL file://${PACKAGE_DIR}/${OPUS_FILE}
|
||||
DOWNLOAD_DIR ${DOWNLOAD_DIR}
|
||||
URL_HASH ${OPUS_HASH_TYPE}=${OPUS_HASH}
|
||||
PREFIX ${BUILD_DIR}/opus
|
||||
CONFIGURE_COMMAND ${CONFIGURE_ENV} && cd ${BUILD_DIR}/opus/src/external_opus/ && ${CONFIGURE_COMMAND} --prefix=${LIBDIR}/opus
|
||||
--disable-shared
|
||||
--enable-static
|
||||
--with-pic
|
||||
--disable-maintainer-mode
|
||||
BUILD_COMMAND ${CONFIGURE_ENV} && cd ${BUILD_DIR}/opus/src/external_opus/ && make -j${MAKE_THREADS}
|
||||
INSTALL_COMMAND ${CONFIGURE_ENV} && cd ${BUILD_DIR}/opus/src/external_opus/ && make install
|
||||
INSTALL_DIR ${LIBDIR}/opus
|
||||
)
|
||||
|
||||
if(MSVC)
|
||||
set_target_properties(external_opus PROPERTIES FOLDER Mingw)
|
||||
set(OPUS_CMAKE_ARGS
|
||||
-DPACKAGE_VERSION=${OPUS_VERSION}
|
||||
-DOPUS_BUILD_PROGRAMS=OFF
|
||||
-DOPUS_BUILD_TESTING=OFF
|
||||
)
|
||||
endif()
|
||||
|
||||
if(NOT WIN32)
|
||||
ExternalProject_Add(external_opus
|
||||
URL file://${PACKAGE_DIR}/${OPUS_FILE}
|
||||
DOWNLOAD_DIR ${DOWNLOAD_DIR}
|
||||
URL_HASH ${OPUS_HASH_TYPE}=${OPUS_HASH}
|
||||
PREFIX ${BUILD_DIR}/opus
|
||||
CONFIGURE_COMMAND ${CONFIGURE_ENV} && cd ${BUILD_DIR}/opus/src/external_opus/ && ${CONFIGURE_COMMAND} --prefix=${LIBDIR}/opus
|
||||
--disable-shared
|
||||
--enable-static
|
||||
--with-pic
|
||||
--disable-maintainer-mode
|
||||
BUILD_COMMAND ${CONFIGURE_ENV} && cd ${BUILD_DIR}/opus/src/external_opus/ && make -j${MAKE_THREADS}
|
||||
INSTALL_COMMAND ${CONFIGURE_ENV} && cd ${BUILD_DIR}/opus/src/external_opus/ && make install
|
||||
INSTALL_DIR ${LIBDIR}/opus
|
||||
)
|
||||
else()
|
||||
ExternalProject_Add(external_opus
|
||||
URL file://${PACKAGE_DIR}/${OPUS_FILE}
|
||||
DOWNLOAD_DIR ${DOWNLOAD_DIR}
|
||||
URL_HASH ${OPUS_HASH_TYPE}=${OPUS_HASH}
|
||||
PREFIX ${BUILD_DIR}/opus
|
||||
PATCH_COMMAND COMMAND ${PATCH_CMD} -p 1 -d ${BUILD_DIR}/opus/src/external_opus < ${PATCH_DIR}/opus_windows.diff
|
||||
CMAKE_ARGS -DCMAKE_INSTALL_PREFIX=${LIBDIR}/opus ${OPUS_CMAKE_ARGS}
|
||||
INSTALL_DIR ${LIBDIR}/opus
|
||||
)
|
||||
endif()
|
||||
|
|
|
@ -1,3 +1,5 @@
|
|||
# SPDX-FileCopyrightText: 2017-2022 Blender Foundation
|
||||
#
|
||||
# SPDX-License-Identifier: GPL-2.0-or-later
|
||||
|
||||
if(WIN32)
|
||||
|
|
|
@ -1,3 +1,5 @@
|
|||
# SPDX-FileCopyrightText: 2019-2022 Blender Foundation
|
||||
#
|
||||
# SPDX-License-Identifier: GPL-2.0-or-later
|
||||
|
||||
if(MSVC)
|
||||
|
|
|
@ -1,3 +1,5 @@
|
|||
# SPDX-FileCopyrightText: 2002-2022 Blender Foundation
|
||||
#
|
||||
# SPDX-License-Identifier: GPL-2.0-or-later
|
||||
|
||||
set(PNG_EXTRA_ARGS
|
||||
|
|
|
@ -1,3 +1,5 @@
|
|||
# SPDX-FileCopyrightText: 2012-2022 Blender Foundation
|
||||
#
|
||||
# SPDX-License-Identifier: GPL-2.0-or-later
|
||||
|
||||
set(POTRACE_EXTRA_ARGS
|
||||
|
|
|
@ -1,3 +1,5 @@
|
|||
# SPDX-FileCopyrightText: 2017-2022 Blender Foundation
|
||||
#
|
||||
# SPDX-License-Identifier: GPL-2.0-or-later
|
||||
|
||||
if(WIN32)
|
||||
|
|
|
@ -1,3 +1,5 @@
|
|||
# SPDX-FileCopyrightText: 2002-2022 Blender Foundation
|
||||
#
|
||||
# SPDX-License-Identifier: GPL-2.0-or-later
|
||||
|
||||
set(PUGIXML_EXTRA_ARGS
|
||||
|
|
|
@ -1,3 +1,5 @@
|
|||
# SPDX-FileCopyrightText: 2022 Blender Foundation
|
||||
#
|
||||
# SPDX-License-Identifier: GPL-2.0-or-later
|
||||
|
||||
set(PYBIND11_EXTRA_ARGS
|
||||
|
|
|
@ -1,3 +1,5 @@
|
|||
# SPDX-FileCopyrightText: 2022 Blender Foundation
|
||||
#
|
||||
# SPDX-License-Identifier: GPL-2.0-or-later
|
||||
|
||||
set(PYSTRING_EXTRA_ARGS
|
||||
|
|
|
@ -1,3 +1,5 @@
|
|||
# SPDX-FileCopyrightText: 2017-2023 Blender Foundation
|
||||
#
|
||||
# SPDX-License-Identifier: GPL-2.0-or-later
|
||||
|
||||
set(PYTHON_POSTFIX)
|
||||
|
|
|
@ -1,3 +1,5 @@
|
|||
# SPDX-FileCopyrightText: 2017-2023 Blender Foundation
|
||||
#
|
||||
# SPDX-License-Identifier: GPL-2.0-or-later
|
||||
|
||||
if(WIN32 AND BUILD_MODE STREQUAL Debug)
|
||||
|
|
|
@ -1,3 +1,5 @@
|
|||
# SPDX-FileCopyrightText: 2022 Blender Foundation
|
||||
#
|
||||
# SPDX-License-Identifier: GPL-2.0-or-later
|
||||
|
||||
set(ROBINMAP_EXTRA_ARGS
|
||||
|
|
|
@ -1,3 +1,5 @@
|
|||
# SPDX-FileCopyrightText: 2012-2022 Blender Foundation
|
||||
#
|
||||
# SPDX-License-Identifier: GPL-2.0-or-later
|
||||
|
||||
if(WIN32)
|
||||
|
|
|
@ -1,219 +0,0 @@
|
|||
# SPDX-License-Identifier: GPL-2.0-or-later
|
||||
|
||||
##################################################################################################
|
||||
# Mingw64 Builds
|
||||
##################################################################################################
|
||||
# This installs mingw64+msys to compile ffmpeg/iconv/libsndfile/fftw3
|
||||
##################################################################################################
|
||||
|
||||
message("LIBDIR = ${LIBDIR}")
|
||||
macro(cmake_to_msys_path MsysPath ResultingPath)
|
||||
string(REPLACE ":" "" TmpPath "${MsysPath}")
|
||||
string(SUBSTRING ${TmpPath} 0 1 Drive)
|
||||
string(SUBSTRING ${TmpPath} 1 255 PathPart)
|
||||
string(TOLOWER ${Drive} LowerDrive)
|
||||
string(CONCAT ${ResultingPath} "/" ${LowerDrive} ${PathPart})
|
||||
endmacro()
|
||||
cmake_to_msys_path(${LIBDIR} mingw_LIBDIR)
|
||||
message("mingw_LIBDIR = ${mingw_LIBDIR}")
|
||||
|
||||
message("Checking for mingw64")
|
||||
# download ming64
|
||||
if(NOT EXISTS "${DOWNLOAD_DIR}/x86_64-4.9.4-release-win32-seh-rt_v5-rev0.7z")
|
||||
message("Downloading mingw64")
|
||||
file(DOWNLOAD "https://nchc.dl.sourceforge.net/project/mingw-w64/Toolchains%20targetting%20Win64/Personal%20Builds/mingw-builds/4.9.4/threads-win32/seh/x86_64-4.9.4-release-win32-seh-rt_v5-rev0.7z" "${DOWNLOAD_DIR}/x86_64-4.9.4-release-win32-seh-rt_v5-rev0.7z")
|
||||
endif()
|
||||
|
||||
# make mingw root directory
|
||||
if(NOT EXISTS "${DOWNLOAD_DIR}/mingw")
|
||||
execute_process(
|
||||
COMMAND ${CMAKE_COMMAND} -E make_directory ${DOWNLOAD_DIR}/mingw
|
||||
WORKING_DIRECTORY ${DOWNLOAD_DIR}
|
||||
)
|
||||
endif()
|
||||
|
||||
# extract mingw64
|
||||
if((NOT EXISTS "${DOWNLOAD_DIR}/mingw/mingw64/ming64sh.cmd") AND (EXISTS "${DOWNLOAD_DIR}/x86_64-4.9.4-release-win32-seh-rt_v5-rev0.7z"))
|
||||
message("Extracting mingw64")
|
||||
execute_process(
|
||||
COMMAND ${CMAKE_COMMAND} -E tar jxf ${DOWNLOAD_DIR}/x86_64-4.9.4-release-win32-seh-rt_v5-rev0.7z
|
||||
WORKING_DIRECTORY ${DOWNLOAD_DIR}/mingw
|
||||
)
|
||||
endif()
|
||||
|
||||
message("Checking for pkg-config")
|
||||
if(NOT EXISTS "${DOWNLOAD_DIR}/pkg-config-lite-0.28-1_bin-win32.zip")
|
||||
message("Downloading pkg-config")
|
||||
file(DOWNLOAD "https://nchc.dl.sourceforge.net/project/pkgconfiglite/0.28-1/pkg-config-lite-0.28-1_bin-win32.zip" "${DOWNLOAD_DIR}/pkg-config-lite-0.28-1_bin-win32.zip")
|
||||
endif()
|
||||
|
||||
# extract pkgconfig
|
||||
if((NOT EXISTS "${DOWNLOAD_DIR}/mingw/mingw64/bin/pkg-config.exe") AND (EXISTS "${DOWNLOAD_DIR}/pkg-config-lite-0.28-1_bin-win32.zip"))
|
||||
message("Extracting pkg-config")
|
||||
execute_process(
|
||||
COMMAND ${CMAKE_COMMAND} -E tar jxf "${DOWNLOAD_DIR}/pkg-config-lite-0.28-1_bin-win32.zip"
|
||||
WORKING_DIRECTORY ${DOWNLOAD_DIR}/
|
||||
)
|
||||
|
||||
execute_process(
|
||||
COMMAND ${CMAKE_COMMAND} -E copy "${DOWNLOAD_DIR}/pkg-config-lite-0.28-1/bin/pkg-config.exe" "${DOWNLOAD_DIR}/mingw/mingw64/bin/pkg-config.exe"
|
||||
)
|
||||
|
||||
endif()
|
||||
|
||||
message("Checking for nasm")
|
||||
if(NOT EXISTS "${DOWNLOAD_DIR}/nasm-2.13.02-win64.zip")
|
||||
message("Downloading nasm")
|
||||
file(DOWNLOAD "http://www.nasm.us/pub/nasm/releasebuilds/2.13.02/win64/nasm-2.13.02-win64.zip" "${DOWNLOAD_DIR}/nasm-2.13.02-win64.zip")
|
||||
endif()
|
||||
|
||||
# extract nasm
|
||||
if((NOT EXISTS "${DOWNLOAD_DIR}/mingw/mingw64/bin/nasm.exe") AND (EXISTS "${DOWNLOAD_DIR}/nasm-2.13.02-win64.zip"))
|
||||
message("Extracting nasm")
|
||||
execute_process(
|
||||
COMMAND ${CMAKE_COMMAND} -E tar jxf "${DOWNLOAD_DIR}/nasm-2.13.02-win64.zip"
|
||||
WORKING_DIRECTORY ${DOWNLOAD_DIR}/
|
||||
)
|
||||
execute_process(
|
||||
COMMAND ${CMAKE_COMMAND} -E copy "${DOWNLOAD_DIR}/nasm-2.13.02/nasm.exe" "${DOWNLOAD_DIR}/mingw/mingw64/bin/nasm.exe"
|
||||
)
|
||||
|
||||
endif()
|
||||
SET(NASM_PATH ${DOWNLOAD_DIR}/mingw/mingw64/bin/nasm.exe)
|
||||
|
||||
message("Checking for mingwGet")
|
||||
if(NOT EXISTS "${DOWNLOAD_DIR}/mingw-get-0.6.2-mingw32-beta-20131004-1-bin.zip")
|
||||
message("Downloading mingw-get")
|
||||
file(DOWNLOAD "https://nchc.dl.sourceforge.net/project/mingw/Installer/mingw-get/mingw-get-0.6.2-beta-20131004-1/mingw-get-0.6.2-mingw32-beta-20131004-1-bin.zip" "${DOWNLOAD_DIR}/mingw-get-0.6.2-mingw32-beta-20131004-1-bin.zip")
|
||||
endif()
|
||||
|
||||
# extract mingw_get
|
||||
if((NOT EXISTS "${DOWNLOAD_DIR}/mingw/mingw64/bin/mingw-get.exe") AND (EXISTS "${DOWNLOAD_DIR}/mingw-get-0.6.2-mingw32-beta-20131004-1-bin.zip"))
|
||||
message("Extracting mingw-get")
|
||||
execute_process(
|
||||
COMMAND ${CMAKE_COMMAND} -E tar jxf "${DOWNLOAD_DIR}/mingw-get-0.6.2-mingw32-beta-20131004-1-bin.zip"
|
||||
WORKING_DIRECTORY ${DOWNLOAD_DIR}/mingw/mingw64/
|
||||
)
|
||||
endif()
|
||||
|
||||
if((EXISTS "${DOWNLOAD_DIR}/mingw/mingw64/bin/mingw-get.exe") AND (NOT EXISTS "${DOWNLOAD_DIR}/mingw/mingw64/msys/1.0/bin/make.exe"))
|
||||
message("Installing MSYS")
|
||||
execute_process(
|
||||
COMMAND ${DOWNLOAD_DIR}/mingw/mingw64/bin/mingw-get install msys msys-patch
|
||||
WORKING_DIRECTORY ${DOWNLOAD_DIR}/mingw/mingw64/bin/
|
||||
)
|
||||
endif()
|
||||
|
||||
if((EXISTS "${DOWNLOAD_DIR}/mingw/mingw64/bin/mingw-get.exe") AND (NOT EXISTS "${DOWNLOAD_DIR}/mingw/mingw64/msys/1.0/bin/mktemp.exe"))
|
||||
message("Installing mktemp")
|
||||
execute_process(
|
||||
COMMAND ${DOWNLOAD_DIR}/mingw/mingw64/bin/mingw-get install msys msys-mktemp
|
||||
WORKING_DIRECTORY ${DOWNLOAD_DIR}/mingw/mingw64/bin/
|
||||
)
|
||||
endif()
|
||||
|
||||
if((EXISTS "${DOWNLOAD_DIR}/mingw/mingw64/bin/mingw-get.exe") AND (NOT EXISTS "${DOWNLOAD_DIR}/mingw/mingw64/msys/1.0/bin/m4.exe"))
|
||||
message("Installing m4")
|
||||
execute_process(
|
||||
COMMAND ${DOWNLOAD_DIR}/mingw/mingw64/bin/mingw-get install msys msys-m4
|
||||
WORKING_DIRECTORY ${DOWNLOAD_DIR}/mingw/mingw64/bin/
|
||||
)
|
||||
endif()
|
||||
|
||||
message("Checking for CoreUtils")
|
||||
# download old core_utils for pr.exe (ffmpeg needs it to build)
|
||||
if(NOT EXISTS "${DOWNLOAD_DIR}/coreutils-5.97-MSYS-1.0.11-snapshot.tar.bz2")
|
||||
message("Downloading CoreUtils 5.97")
|
||||
file(DOWNLOAD "https://nchc.dl.sourceforge.net/project/mingw/MSYS/Base/msys-core/_obsolete/coreutils-5.97-MSYS-1.0.11-2/coreutils-5.97-MSYS-1.0.11-snapshot.tar.bz2" "${DOWNLOAD_DIR}/coreutils-5.97-MSYS-1.0.11-snapshot.tar.bz2")
|
||||
endif()
|
||||
|
||||
if((EXISTS "${DOWNLOAD_DIR}/coreutils-5.97-MSYS-1.0.11-snapshot.tar.bz2") AND (NOT EXISTS "${DOWNLOAD_DIR}/mingw/mingw64/msys/1.0/bin/pr.exe"))
|
||||
message("Installing pr from CoreUtils 5.97")
|
||||
execute_process(
|
||||
COMMAND ${CMAKE_COMMAND} -E make_directory ${DOWNLOAD_DIR}/tmp_coreutils
|
||||
WORKING_DIRECTORY ${DOWNLOAD_DIR}
|
||||
)
|
||||
|
||||
execute_process(
|
||||
COMMAND ${CMAKE_COMMAND} -E tar jxf ${DOWNLOAD_DIR}/coreutils-5.97-MSYS-1.0.11-snapshot.tar.bz2
|
||||
WORKING_DIRECTORY ${DOWNLOAD_DIR}/tmp_coreutils/
|
||||
)
|
||||
|
||||
execute_process(
|
||||
COMMAND ${CMAKE_COMMAND} -E copy ${DOWNLOAD_DIR}/tmp_coreutils/coreutils-5.97/bin/pr.exe "${DOWNLOAD_DIR}/mingw/mingw64/msys/1.0/bin/pr.exe"
|
||||
WORKING_DIRECTORY ${DOWNLOAD_DIR}/tmp_coreutils/
|
||||
)
|
||||
endif()
|
||||
|
||||
if(NOT EXISTS "${DOWNLOAD_DIR}/mingw/mingw64/ming64sh.cmd")
|
||||
message("Installing ming64sh.cmd")
|
||||
execute_process(
|
||||
COMMAND ${CMAKE_COMMAND} -E copy ${PATCH_DIR}/ming64sh.cmd ${DOWNLOAD_DIR}/mingw/mingw64/ming64sh.cmd
|
||||
)
|
||||
endif()
|
||||
|
||||
message("Checking for perl")
|
||||
# download perl for libvpx
|
||||
if(NOT EXISTS "${DOWNLOAD_DIR}/strawberry-perl-5.22.1.3-64bit-portable.zip")
|
||||
message("Downloading perl")
|
||||
file(DOWNLOAD "http://strawberryperl.com/download/5.22.1.3/strawberry-perl-5.22.1.3-64bit-portable.zip" "${DOWNLOAD_DIR}/strawberry-perl-5.22.1.3-64bit-portable.zip")
|
||||
endif()
|
||||
|
||||
# make perl root directory
|
||||
if(NOT EXISTS "${DOWNLOAD_DIR}/perl")
|
||||
execute_process(
|
||||
COMMAND ${CMAKE_COMMAND} -E make_directory ${DOWNLOAD_DIR}/perl
|
||||
WORKING_DIRECTORY ${DOWNLOAD_DIR}
|
||||
)
|
||||
endif()
|
||||
|
||||
# extract perl
|
||||
if((NOT EXISTS "${DOWNLOAD_DIR}/perl/portable.perl") AND (EXISTS "${DOWNLOAD_DIR}/strawberry-perl-5.22.1.3-64bit-portable.zip"))
|
||||
message("Extracting perl")
|
||||
execute_process(
|
||||
COMMAND ${CMAKE_COMMAND} -E tar jxf ${DOWNLOAD_DIR}/strawberry-perl-5.22.1.3-64bit-portable.zip
|
||||
WORKING_DIRECTORY ${DOWNLOAD_DIR}/perl
|
||||
)
|
||||
endif()
|
||||
|
||||
# get yasm for vpx
|
||||
if(NOT EXISTS "${DOWNLOAD_DIR}/mingw/mingw64/bin/yasm.exe")
|
||||
message("Downloading yasm")
|
||||
file(DOWNLOAD "http://www.tortall.net/projects/yasm/releases/yasm-1.3.0-win64.exe" "${DOWNLOAD_DIR}/mingw/mingw64/bin/yasm.exe")
|
||||
endif()
|
||||
|
||||
message("checking x86_64-w64-mingw32-strings.exe")
|
||||
# copy strings.exe to x86_64-w64-mingw32-strings.exe for x264
|
||||
if(NOT EXISTS "${DOWNLOAD_DIR}/mingw/mingw64/bin/x86_64-w64-mingw32-strings.exe")
|
||||
message("fixing x86_64-w64-mingw32-strings.exe")
|
||||
execute_process(
|
||||
COMMAND ${CMAKE_COMMAND} -E copy "${DOWNLOAD_DIR}/mingw/mingw64/bin/strings.exe" "${DOWNLOAD_DIR}/mingw/mingw64/bin/x86_64-w64-mingw32-strings.exe"
|
||||
)
|
||||
endif()
|
||||
|
||||
message("checking x86_64-w64-mingw32-ar.exe")
|
||||
# copy ar.exe to x86_64-w64-mingw32-ar.exe for x264
|
||||
if(NOT EXISTS "${DOWNLOAD_DIR}/mingw/mingw64/bin/x86_64-w64-mingw32-ar.exe")
|
||||
message("fixing x86_64-w64-mingw32-ar.exe")
|
||||
execute_process(
|
||||
COMMAND ${CMAKE_COMMAND} -E copy "${DOWNLOAD_DIR}/mingw/mingw64/bin/ar.exe" "${DOWNLOAD_DIR}/mingw/mingw64/bin/x86_64-w64-mingw32-ar.exe"
|
||||
)
|
||||
endif()
|
||||
|
||||
message("checking x86_64-w64-mingw32-strip.exe")
|
||||
# copy strip.exe to x86_64-w64-mingw32-strip.exe for x264
|
||||
if(NOT EXISTS "${DOWNLOAD_DIR}/mingw/mingw64/bin/x86_64-w64-mingw32-strip.exe")
|
||||
message("fixing x86_64-w64-mingw32-strip.exe")
|
||||
execute_process(
|
||||
COMMAND ${CMAKE_COMMAND} -E copy "${DOWNLOAD_DIR}/mingw/mingw64/bin/strip.exe" "${DOWNLOAD_DIR}/mingw/mingw64/bin/x86_64-w64-mingw32-strip.exe"
|
||||
)
|
||||
endif()
|
||||
|
||||
message("checking x86_64-w64-mingw32-ranlib.exe")
|
||||
# copy ranlib.exe to x86_64-w64-mingw32-ranlib.exe for x264
|
||||
if(NOT EXISTS "${DOWNLOAD_DIR}/mingw/mingw64/bin/x86_64-w64-mingw32-ranlib.exe")
|
||||
message("fixing x86_64-w64-mingw32-ranlib.exe")
|
||||
execute_process(
|
||||
COMMAND ${CMAKE_COMMAND} -E copy "${DOWNLOAD_DIR}/mingw/mingw64/bin/ranlib.exe" "${DOWNLOAD_DIR}/mingw/mingw64/bin/x86_64-w64-mingw32-ranlib.exe"
|
||||
)
|
||||
endif()
|
|
@ -0,0 +1,156 @@
|
|||
# SPDX-FileCopyrightText: 2023 Blender Foundation
|
||||
#
|
||||
# SPDX-License-Identifier: GPL-2.0-or-later
|
||||
|
||||
##################################################################################################
|
||||
# msys2 Builds
|
||||
##################################################################################################
|
||||
# This installs msys to compile ffmpeg/libsndfile/fftw3/gmp
|
||||
##################################################################################################
|
||||
# Note - no compiler is actually installed here, we just use the tools
|
||||
##################################################################################################
|
||||
|
||||
message("LIBDIR = ${LIBDIR}")
|
||||
macro(cmake_to_msys_path MsysPath ResultingPath)
|
||||
string(REPLACE ":" "" TmpPath "${MsysPath}")
|
||||
string(SUBSTRING ${TmpPath} 0 1 Drive)
|
||||
string(SUBSTRING ${TmpPath} 1 255 PathPart)
|
||||
string(TOLOWER ${Drive} LowerDrive)
|
||||
string(CONCAT ${ResultingPath} "/" ${LowerDrive} ${PathPart})
|
||||
endmacro()
|
||||
cmake_to_msys_path(${LIBDIR} msys2_LIBDIR)
|
||||
message("msys2_LIBDIR = ${msys2_LIBDIR}")
|
||||
|
||||
# Get msys2-base (currently x64 only)
|
||||
message("Checking for msys2 base")
|
||||
if(NOT EXISTS "${DOWNLOAD_DIR}/msys2-base-x86_64-20221028.tar.xz")
|
||||
message("Downloading msys2-base")
|
||||
file(DOWNLOAD "https://repo.msys2.org/distrib/x86_64/msys2-base-x86_64-20221028.tar.xz" "${DOWNLOAD_DIR}/msys2-base-x86_64-20221028.tar.xz")
|
||||
endif()
|
||||
|
||||
# Make msys2 root directory
|
||||
if(NOT EXISTS "${DOWNLOAD_DIR}/msys2")
|
||||
execute_process(
|
||||
COMMAND ${CMAKE_COMMAND} -E make_directory ${DOWNLOAD_DIR}/msys2
|
||||
WORKING_DIRECTORY ${DOWNLOAD_DIR}
|
||||
)
|
||||
endif()
|
||||
|
||||
# Extract msys2
|
||||
if((NOT EXISTS "${DOWNLOAD_DIR}/msys2/msys64/msys2_shell.cmd") AND (EXISTS "${DOWNLOAD_DIR}/msys2-base-x86_64-20221028.tar.xz"))
|
||||
message("Extracting msys2 base")
|
||||
execute_process(
|
||||
COMMAND ${CMAKE_COMMAND} -E tar jxf ${DOWNLOAD_DIR}/msys2-base-x86_64-20221028.tar.xz
|
||||
WORKING_DIRECTORY ${DOWNLOAD_DIR}/msys2
|
||||
)
|
||||
|
||||
# Start msys2 with command "exit" - does initial setup etc then exits
|
||||
message("Performing first-time load for msys2")
|
||||
execute_process(
|
||||
COMMAND ${DOWNLOAD_DIR}/msys2/msys64/msys2_shell.cmd -defterm -no-start -clang64 -c exit
|
||||
WORKING_DIRECTORY ${DOWNLOAD_DIR}/msys2/msys64
|
||||
)
|
||||
|
||||
# Do initial upgrade of pacman packages (only required for initial setup, to get
|
||||
# latest packages as opposed to to what the installer comes with)
|
||||
execute_process(
|
||||
COMMAND ${DOWNLOAD_DIR}/msys2/msys64/msys2_shell.cmd -defterm -no-start -clang64 -c "pacman -Syu --noconfirm && exit"
|
||||
WORKING_DIRECTORY ${DOWNLOAD_DIR}/msys2/msys64
|
||||
)
|
||||
endif()
|
||||
|
||||
# If m4 isn't there, the others probably aren't either
|
||||
if(NOT EXISTS "${DOWNLOAD_DIR}/msys2/msys64/usr/bin/m4.exe")
|
||||
# Refresh pacman repositories (similar to debian's `apt update`)
|
||||
message("Refreshing pacman")
|
||||
execute_process(
|
||||
COMMAND ${DOWNLOAD_DIR}/msys2/msys64/msys2_shell.cmd -defterm -no-start -clang64 -c "pacman -Syy --noconfirm && exit"
|
||||
WORKING_DIRECTORY ${DOWNLOAD_DIR}/msys2/msys64
|
||||
)
|
||||
|
||||
message("Installing required packages")
|
||||
execute_process(
|
||||
COMMAND ${DOWNLOAD_DIR}/msys2/msys64/msys2_shell.cmd -defterm -no-start -clang64 -c "pacman -S patch m4 coreutils pkgconf make diffutils autoconf-wrapper --noconfirm && exit"
|
||||
WORKING_DIRECTORY ${DOWNLOAD_DIR}/msys2/msys64
|
||||
)
|
||||
endif()
|
||||
|
||||
# Strip out the copy of perl that comes with msys2 if it exists, otherwise python builds break
|
||||
if(EXISTS "${DOWNLOAD_DIR}/msys2/msys64/usr/bin/perl.exe")
|
||||
execute_process(
|
||||
COMMAND ${CMAKE_COMMAND} -E rm ${DOWNLOAD_DIR}/msys2/msys64/usr/bin/perl.exe
|
||||
WORKING_DIRECTORY ${DOWNLOAD_DIR}/msys2/msys64
|
||||
)
|
||||
endif()
|
||||
|
||||
# Strip out the copy of link that comes with some packages if it exists, otherwise meson builds break
|
||||
if(EXISTS "${DOWNLOAD_DIR}/msys2/msys64/usr/bin/link.exe")
|
||||
execute_process(
|
||||
COMMAND ${CMAKE_COMMAND} -E rm ${DOWNLOAD_DIR}/msys2/msys64/usr/bin/link.exe
|
||||
WORKING_DIRECTORY ${DOWNLOAD_DIR}/msys2/msys64
|
||||
)
|
||||
endif()
|
||||
|
||||
message("Checking for nasm")
|
||||
if(NOT EXISTS "${DOWNLOAD_DIR}/nasm-2.13.02-win64.zip")
|
||||
message("Downloading nasm")
|
||||
file(DOWNLOAD "http://www.nasm.us/pub/nasm/releasebuilds/2.13.02/win64/nasm-2.13.02-win64.zip" "${DOWNLOAD_DIR}/nasm-2.13.02-win64.zip")
|
||||
endif()
|
||||
|
||||
# extract nasm
|
||||
if((NOT EXISTS "${DOWNLOAD_DIR}/msys2/msys64/usr/bin/nasm.exe") AND (EXISTS "${DOWNLOAD_DIR}/nasm-2.13.02-win64.zip"))
|
||||
message("Extracting nasm")
|
||||
execute_process(
|
||||
COMMAND ${CMAKE_COMMAND} -E tar jxf "${DOWNLOAD_DIR}/nasm-2.13.02-win64.zip"
|
||||
WORKING_DIRECTORY ${DOWNLOAD_DIR}/
|
||||
)
|
||||
execute_process(
|
||||
COMMAND ${CMAKE_COMMAND} -E copy "${DOWNLOAD_DIR}/nasm-2.13.02/nasm.exe" "${DOWNLOAD_DIR}/msys2/msys64/usr/bin/nasm.exe"
|
||||
)
|
||||
endif()
|
||||
|
||||
message("Checking for perl")
|
||||
# download perl for libvpx
|
||||
if(NOT EXISTS "${DOWNLOAD_DIR}/strawberry-perl-5.22.1.3-64bit-portable.zip")
|
||||
message("Downloading perl")
|
||||
file(DOWNLOAD "http://strawberryperl.com/download/5.22.1.3/strawberry-perl-5.22.1.3-64bit-portable.zip" "${DOWNLOAD_DIR}/strawberry-perl-5.22.1.3-64bit-portable.zip")
|
||||
endif()
|
||||
|
||||
# make perl root directory
|
||||
if(NOT EXISTS "${DOWNLOAD_DIR}/perl")
|
||||
execute_process(
|
||||
COMMAND ${CMAKE_COMMAND} -E make_directory ${DOWNLOAD_DIR}/perl
|
||||
WORKING_DIRECTORY ${DOWNLOAD_DIR}
|
||||
)
|
||||
endif()
|
||||
|
||||
# extract perl
|
||||
if((NOT EXISTS "${DOWNLOAD_DIR}/perl/portable.perl") AND (EXISTS "${DOWNLOAD_DIR}/strawberry-perl-5.22.1.3-64bit-portable.zip"))
|
||||
message("Extracting perl")
|
||||
execute_process(
|
||||
COMMAND ${CMAKE_COMMAND} -E tar jxf ${DOWNLOAD_DIR}/strawberry-perl-5.22.1.3-64bit-portable.zip
|
||||
WORKING_DIRECTORY ${DOWNLOAD_DIR}/perl
|
||||
)
|
||||
endif()
|
||||
|
||||
# Get gas-preprocessor for ffmpeg
|
||||
# This is required for Windows ARM64 builds
|
||||
message("Checking for gas-preprocessor.pl")
|
||||
if(NOT EXISTS "${DOWNLOAD_DIR}/msys2/msys64/usr/bin/gas-preprocessor.pl")
|
||||
message("Downloading gas-preprocessor.pl")
|
||||
file(DOWNLOAD "https://raw.githubusercontent.com/FFmpeg/gas-preprocessor/9309c67acb535ca6248f092e96131d8eb07eefc1/gas-preprocessor.pl" "${DOWNLOAD_DIR}/msys2/msys64/usr/bin/gas-preprocessor.pl")
|
||||
endif()
|
||||
|
||||
# Get ar-lib
|
||||
message("Checking for ar-lib")
|
||||
if(NOT EXISTS "${DOWNLOAD_DIR}/msys2/msys64/usr/bin/ar-lib")
|
||||
message("Downloading ar-lib")
|
||||
file(DOWNLOAD "https://raw.githubusercontent.com/gcc-mirror/gcc/releases/gcc-12.2.0/ar-lib" "${DOWNLOAD_DIR}/msys2/msys64/usr/bin/ar-lib")
|
||||
endif()
|
||||
|
||||
if(NOT EXISTS "${DOWNLOAD_DIR}/msys2/msys64/ming64sh.cmd")
|
||||
message("Installing ming64sh.cmd")
|
||||
execute_process(
|
||||
COMMAND ${CMAKE_COMMAND} -E copy ${PATCH_DIR}/ming64sh.cmd ${DOWNLOAD_DIR}/msys2/msys64/ming64sh.cmd
|
||||
)
|
||||
endif()
|
|
@ -1,3 +1,5 @@
|
|||
# SPDX-FileCopyrightText: 2022 Blender Foundation
|
||||
#
|
||||
# SPDX-License-Identifier: GPL-2.0-or-later
|
||||
|
||||
set(SHADERC_EXTRA_ARGS
|
||||
|
|
|
@ -1,3 +1,5 @@
|
|||
# SPDX-FileCopyrightText: 2022 Blender Foundation
|
||||
#
|
||||
# SPDX-License-Identifier: GPL-2.0-or-later
|
||||
|
||||
# These are build time requirements for shaderc. We only have to unpack these
|
||||
|
|
|
@ -1,35 +1,64 @@
|
|||
# SPDX-FileCopyrightText: 2017-2023 Blender Foundation
|
||||
#
|
||||
# SPDX-License-Identifier: GPL-2.0-or-later
|
||||
|
||||
set(SNDFILE_EXTRA_ARGS)
|
||||
set(SNDFILE_ENV)
|
||||
|
||||
if(WIN32)
|
||||
set(SNDFILE_ENV "PKG_CONFIG_PATH=\
|
||||
${mingw_LIBDIR}/ogg/lib/pkgconfig:\
|
||||
${mingw_LIBDIR}/vorbis/lib/pkgconfig:\
|
||||
${mingw_LIBDIR}/flac/lib/pkgconfig:\
|
||||
${mingw_LIBDIR}/opus/lib/pkgconfig"
|
||||
)
|
||||
set(SNDFILE_ENV set ${SNDFILE_ENV} &&)
|
||||
# Shared for windows because static libs will drag in a libgcc dependency.
|
||||
set(SNDFILE_OPTIONS --disable-static --enable-shared )
|
||||
else()
|
||||
if(NOT WIN32)
|
||||
set(SNDFILE_OPTIONS --enable-static --disable-shared )
|
||||
endif()
|
||||
|
||||
ExternalProject_Add(external_sndfile
|
||||
URL file://${PACKAGE_DIR}/${SNDFILE_FILE}
|
||||
DOWNLOAD_DIR ${DOWNLOAD_DIR}
|
||||
URL_HASH ${SNDFILE_HASH_TYPE}=${SNDFILE_HASH}
|
||||
PREFIX ${BUILD_DIR}/sndfile
|
||||
CONFIGURE_COMMAND ${CONFIGURE_ENV} && cd ${BUILD_DIR}/sndfile/src/external_sndfile/ && ${SNDFILE_ENV} ${CONFIGURE_COMMAND} ${SNDFILE_OPTIONS} --prefix=${mingw_LIBDIR}/sndfile
|
||||
BUILD_COMMAND ${CONFIGURE_ENV} && cd ${BUILD_DIR}/sndfile/src/external_sndfile/ && make -j${MAKE_THREADS}
|
||||
INSTALL_COMMAND ${CONFIGURE_ENV} && cd ${BUILD_DIR}/sndfile/src/external_sndfile/ && make install
|
||||
INSTALL_DIR ${LIBDIR}/sndfile
|
||||
)
|
||||
if(NOT WIN32)
|
||||
ExternalProject_Add(external_sndfile
|
||||
URL file://${PACKAGE_DIR}/${SNDFILE_FILE}
|
||||
DOWNLOAD_DIR ${DOWNLOAD_DIR}
|
||||
URL_HASH ${SNDFILE_HASH_TYPE}=${SNDFILE_HASH}
|
||||
PREFIX ${BUILD_DIR}/sndfile
|
||||
CONFIGURE_COMMAND ${CONFIGURE_ENV} && cd ${BUILD_DIR}/sndfile/src/external_sndfile/ && ${SNDFILE_ENV} ${CONFIGURE_COMMAND} ${SNDFILE_OPTIONS} --prefix=${mingw_LIBDIR}/sndfile
|
||||
BUILD_COMMAND ${CONFIGURE_ENV} && cd ${BUILD_DIR}/sndfile/src/external_sndfile/ && make -j${MAKE_THREADS}
|
||||
INSTALL_COMMAND ${CONFIGURE_ENV} && cd ${BUILD_DIR}/sndfile/src/external_sndfile/ && make install
|
||||
INSTALL_DIR ${LIBDIR}/sndfile
|
||||
)
|
||||
else()
|
||||
# We set FLAC__NO_DLL, otherwise we cannot statically link FLAC
|
||||
set(SNDFILE_C_FLAGS "${CMAKE_C_FLAGS} -DFLAC__NO_DLL=1")
|
||||
|
||||
if(MSVC)
|
||||
set_target_properties(external_sndfile PROPERTIES FOLDER Mingw)
|
||||
set(SNDFILE_EXTRA_ARGS
|
||||
-DCMAKE_POLICY_DEFAULT_CMP0074=NEW
|
||||
-DOgg_ROOT=${LIBDIR}/ogg
|
||||
-DVorbis_ROOT=${LIBDIR}/vorbis
|
||||
-DOpus_ROOT=${LIBDIR}/opus
|
||||
-DLame_ROOT=${LIBDIR}/lame
|
||||
-DLAME_INCLUDE_DIR=${LIBDIR}/lame/include/
|
||||
-DFLAC_ROOT=${LIBDIR}/flac
|
||||
-DBUILD_PROGRAMS=OFF
|
||||
-DBUILD_EXAMPLES=OFF
|
||||
-DBUILD_TESTING=OFF
|
||||
-DBUILD_SHARED_LIBS=ON
|
||||
-DPYTHON_EXECUTABLE=${PYTHON_BINARY}
|
||||
-DCMAKE_C_FLAGS=${SNDFILE_C_FLAGS}
|
||||
)
|
||||
|
||||
ExternalProject_Add(external_sndfile
|
||||
URL file://${PACKAGE_DIR}/${SNDFILE_FILE}
|
||||
DOWNLOAD_DIR ${DOWNLOAD_DIR}
|
||||
URL_HASH ${SNDFILE_HASH_TYPE}=${SNDFILE_HASH}
|
||||
PREFIX ${BUILD_DIR}/sndfile
|
||||
PATCH_COMMAND ${CMAKE_COMMAND} -E copy ${PATCH_DIR}/cmake/modules/FindLame.cmake ${BUILD_DIR}/sndfile/src/external_sndfile/cmake/FindLame.cmake
|
||||
CMAKE_ARGS -DCMAKE_INSTALL_PREFIX=${LIBDIR}/sndfile ${DEFAULT_CMAKE_FLAGS} ${SNDFILE_EXTRA_ARGS}
|
||||
INSTALL_DIR ${LIBDIR}/sndfile
|
||||
)
|
||||
endif()
|
||||
|
||||
if(BUILD_MODE STREQUAL Release AND WIN32)
|
||||
ExternalProject_Add_Step(external_sndfile after_install
|
||||
COMMAND ${CMAKE_COMMAND} -E copy ${LIBDIR}/sndfile/bin/sndfile.dll ${HARVEST_TARGET}/sndfile/lib/sndfile.dll
|
||||
COMMAND ${CMAKE_COMMAND} -E copy ${LIBDIR}/sndfile/lib/sndfile.lib ${HARVEST_TARGET}/sndfile/lib/sndfile.lib
|
||||
COMMAND ${CMAKE_COMMAND} -E copy ${LIBDIR}/sndfile/include/sndfile.h ${HARVEST_TARGET}/sndfile/include/sndfile.h
|
||||
|
||||
DEPENDEES install
|
||||
)
|
||||
endif()
|
||||
|
||||
add_dependencies(
|
||||
|
@ -37,21 +66,5 @@ add_dependencies(
|
|||
external_ogg
|
||||
external_vorbis
|
||||
external_opus
|
||||
external_flac
|
||||
)
|
||||
if(UNIX)
|
||||
add_dependencies(
|
||||
external_sndfile
|
||||
external_flac
|
||||
)
|
||||
endif()
|
||||
|
||||
if(BUILD_MODE STREQUAL Release AND WIN32)
|
||||
ExternalProject_Add_Step(external_sndfile after_install
|
||||
COMMAND lib /def:${BUILD_DIR}/sndfile/src/external_sndfile/src/libsndfile-1.def /machine:x64 /out:${BUILD_DIR}/sndfile/src/external_sndfile/src/libsndfile-1.lib
|
||||
COMMAND ${CMAKE_COMMAND} -E copy ${LIBDIR}/sndfile/bin/libsndfile-1.dll ${HARVEST_TARGET}/sndfile/lib/libsndfile-1.dll
|
||||
COMMAND ${CMAKE_COMMAND} -E copy ${BUILD_DIR}/sndfile/src/external_sndfile/src/libsndfile-1.lib ${HARVEST_TARGET}/sndfile/lib/libsndfile-1.lib
|
||||
COMMAND ${CMAKE_COMMAND} -E copy ${LIBDIR}/sndfile/include/sndfile.h ${HARVEST_TARGET}/sndfile/include/sndfile.h
|
||||
|
||||
DEPENDEES install
|
||||
)
|
||||
endif()
|
||||
|
|
|
@ -1,3 +1,5 @@
|
|||
# SPDX-FileCopyrightText: 2002-2022 Blender Foundation
|
||||
#
|
||||
# SPDX-License-Identifier: GPL-2.0-or-later
|
||||
|
||||
ExternalProject_Add(external_spnav
|
||||
|
|
|
@ -1,3 +1,5 @@
|
|||
# SPDX-FileCopyrightText: 2018-2022 Blender Foundation
|
||||
#
|
||||
# SPDX-License-Identifier: GPL-2.0-or-later
|
||||
|
||||
set(SQLITE_CONFIGURE_ENV echo .)
|
||||
|
|
|
@ -1,3 +1,5 @@
|
|||
# SPDX-FileCopyrightText: 2002-2022 Blender Foundation
|
||||
#
|
||||
# SPDX-License-Identifier: GPL-2.0-or-later
|
||||
|
||||
ExternalProject_Add(external_sse2neon
|
||||
|
|
|
@ -1,3 +1,5 @@
|
|||
# SPDX-FileCopyrightText: 2018-2023 Blender Foundation
|
||||
#
|
||||
# SPDX-License-Identifier: GPL-2.0-or-later
|
||||
|
||||
set(SSL_CONFIGURE_COMMAND ./Configure)
|
||||
|
|
|
@ -1,4 +1,7 @@
|
|||
# SPDX-FileCopyrightText: 2002-2023 Blender Foundation
|
||||
#
|
||||
# SPDX-License-Identifier: GPL-2.0-or-later
|
||||
|
||||
set(TBB_EXTRA_ARGS
|
||||
-DTBB_BUILD_SHARED=On
|
||||
-DTBB_BUILD_TBBMALLOC=On
|
||||
|
|
|
@ -1,3 +1,5 @@
|
|||
# SPDX-FileCopyrightText: 2002-2023 Blender Foundation
|
||||
#
|
||||
# SPDX-License-Identifier: GPL-2.0-or-later
|
||||
|
||||
if(UNIX)
|
||||
|
@ -6,30 +8,41 @@ else()
|
|||
set(THEORA_CONFIGURE_ENV ${CONFIGURE_ENV})
|
||||
endif()
|
||||
|
||||
ExternalProject_Add(external_theora
|
||||
URL file://${PACKAGE_DIR}/${THEORA_FILE}
|
||||
DOWNLOAD_DIR ${DOWNLOAD_DIR}
|
||||
URL_HASH ${THEORA_HASH_TYPE}=${THEORA_HASH}
|
||||
PREFIX ${BUILD_DIR}/theora
|
||||
PATCH_COMMAND ${PATCH_CMD} -p 0 -d ${BUILD_DIR}/theora/src/external_theora < ${PATCH_DIR}/theora.diff
|
||||
CONFIGURE_COMMAND ${THEORA_CONFIGURE_ENV} && cd ${BUILD_DIR}/theora/src/external_theora/ && ${CONFIGURE_COMMAND} --prefix=${LIBDIR}/theora
|
||||
--disable-shared
|
||||
--enable-static
|
||||
--with-pic
|
||||
--with-ogg=${LIBDIR}/ogg
|
||||
--with-vorbis=${LIBDIR}/vorbis
|
||||
--disable-examples
|
||||
BUILD_COMMAND ${THEORA_CONFIGURE_ENV} && cd ${BUILD_DIR}/theora/src/external_theora/ && make -j${MAKE_THREADS}
|
||||
INSTALL_COMMAND ${THEORA_CONFIGURE_ENV} && cd ${BUILD_DIR}/theora/src/external_theora/ && make install
|
||||
INSTALL_DIR ${LIBDIR}/theora
|
||||
)
|
||||
if(NOT WIN32)
|
||||
ExternalProject_Add(external_theora
|
||||
URL file://${PACKAGE_DIR}/${THEORA_FILE}
|
||||
DOWNLOAD_DIR ${DOWNLOAD_DIR}
|
||||
URL_HASH ${THEORA_HASH_TYPE}=${THEORA_HASH}
|
||||
PREFIX ${BUILD_DIR}/theora
|
||||
PATCH_COMMAND ${PATCH_CMD} -p 0 -d ${BUILD_DIR}/theora/src/external_theora < ${PATCH_DIR}/theora.diff
|
||||
CONFIGURE_COMMAND ${THEORA_CONFIGURE_ENV} && cd ${BUILD_DIR}/theora/src/external_theora/ && ${CONFIGURE_COMMAND} --prefix=${LIBDIR}/theora
|
||||
--disable-shared
|
||||
--enable-static
|
||||
--with-pic
|
||||
--with-ogg=${LIBDIR}/ogg
|
||||
--with-vorbis=${LIBDIR}/vorbis
|
||||
--disable-examples
|
||||
BUILD_COMMAND ${THEORA_CONFIGURE_ENV} && cd ${BUILD_DIR}/theora/src/external_theora/ && make -j${MAKE_THREADS}
|
||||
INSTALL_COMMAND ${THEORA_CONFIGURE_ENV} && cd ${BUILD_DIR}/theora/src/external_theora/ && make install
|
||||
INSTALL_DIR ${LIBDIR}/theora
|
||||
)
|
||||
else()
|
||||
# We are kind of naughty here and steal vorbis' FindOgg.cmake, but given it's a dependency anyway...
|
||||
ExternalProject_Add(external_theora
|
||||
URL file://${PACKAGE_DIR}/${THEORA_FILE}
|
||||
DOWNLOAD_DIR ${DOWNLOAD_DIR}
|
||||
URL_HASH ${THEORA_HASH_TYPE}=${THEORA_HASH}
|
||||
PREFIX ${BUILD_DIR}/theora
|
||||
PATCH_COMMAND COMMAND ${CMAKE_COMMAND} -E copy ${PATCH_DIR}/cmakelists_theora.txt ${BUILD_DIR}/theora/src/external_theora/CMakeLists.txt &&
|
||||
${CMAKE_COMMAND} -E copy ${PATCH_DIR}/libtheora.def ${BUILD_DIR}/theora/src/external_theora/libtheora.def &&
|
||||
${CMAKE_COMMAND} -E copy ${BUILD_DIR}/vorbis/src/external_vorbis/cmake/FindOgg.cmake ${BUILD_DIR}/theora/src/external_theora/FindOgg.cmake
|
||||
CMAKE_ARGS -DCMAKE_INSTALL_PREFIX=${LIBDIR}/theora -DOGG_ROOT=${LIBDIR}/ogg ${DEFAULT_CMAKE_FLAGS} -DLIBDIR=${LIBDIR}
|
||||
INSTALL_DIR ${LIBDIR}/theora
|
||||
)
|
||||
endif()
|
||||
|
||||
add_dependencies(
|
||||
external_theora
|
||||
external_vorbis
|
||||
external_ogg
|
||||
)
|
||||
|
||||
if(MSVC)
|
||||
set_target_properties(external_theora PROPERTIES FOLDER Mingw)
|
||||
endif()
|
||||
|
|
|
@ -1,3 +1,5 @@
|
|||
# SPDX-FileCopyrightText: 2002-2022 Blender Foundation
|
||||
#
|
||||
# SPDX-License-Identifier: GPL-2.0-or-later
|
||||
|
||||
set(TIFF_EXTRA_ARGS
|
||||
|
|
|
@ -1,3 +1,5 @@
|
|||
# SPDX-FileCopyrightText: 2019-2023 Blender Foundation
|
||||
#
|
||||
# SPDX-License-Identifier: GPL-2.0-or-later
|
||||
|
||||
if(WIN32)
|
||||
|
@ -93,7 +95,7 @@ set(USD_EXTRA_ARGS
|
|||
)
|
||||
|
||||
# Ray: I'm not sure if the other platforms relied on this or not but this is no longer
|
||||
# needed for windows. If mac/lin confirm, this can be removed.
|
||||
# needed for windows. If mac/lin confirm, this can be removed.
|
||||
if(NOT WIN32)
|
||||
list(APPEND USD_EXTRA_ARGS
|
||||
# USD wants the tbb debug lib set even when you are doing a release build
|
||||
|
|
|
@ -1,3 +1,5 @@
|
|||
# SPDX-FileCopyrightText: 2017-2023 Blender Foundation
|
||||
#
|
||||
# SPDX-License-Identifier: GPL-2.0-or-later
|
||||
|
||||
# CPE's are used to identify dependencies, for more information on what they
|
||||
|
@ -321,12 +323,6 @@ set(X264_HASH bb4f7da03936b5a030ed5827133b58eb3f701d7e5dce32cca4ba6df93797d42e)
|
|||
set(X264_HASH_TYPE SHA256)
|
||||
set(X264_FILE x264-${X264_VERSION}.tar.gz)
|
||||
|
||||
set(XVIDCORE_VERSION 1.3.7)
|
||||
set(XVIDCORE_URI https://downloads.xvid.com/downloads/xvidcore-${XVIDCORE_VERSION}.tar.gz)
|
||||
set(XVIDCORE_HASH abbdcbd39555691dd1c9b4d08f0a031376a3b211652c0d8b3b8aa9be1303ce2d)
|
||||
set(XVIDCORE_HASH_TYPE SHA256)
|
||||
set(XVIDCORE_FILE xvidcore-${XVIDCORE_VERSION}.tar.gz)
|
||||
|
||||
set(OPENJPEG_VERSION 2.5.0)
|
||||
set(OPENJPEG_SHORT_VERSION 2.5)
|
||||
set(OPENJPEG_URI https://github.com/uclouvain/openjpeg/archive/v${OPENJPEG_VERSION}.tar.gz)
|
||||
|
|
|
@ -1,25 +1,34 @@
|
|||
# SPDX-FileCopyrightText: 2002-2023 Blender Foundation
|
||||
#
|
||||
# SPDX-License-Identifier: GPL-2.0-or-later
|
||||
|
||||
if(NOT WIN32)
|
||||
ExternalProject_Add(external_vorbis
|
||||
URL file://${PACKAGE_DIR}/${VORBIS_FILE}
|
||||
DOWNLOAD_DIR ${DOWNLOAD_DIR}
|
||||
URL_HASH ${VORBIS_HASH_TYPE}=${VORBIS_HASH}
|
||||
PREFIX ${BUILD_DIR}/vorbis
|
||||
CONFIGURE_COMMAND ${CONFIGURE_ENV} && cd ${BUILD_DIR}/vorbis/src/external_vorbis/ && ${CONFIGURE_COMMAND} --prefix=${LIBDIR}/vorbis
|
||||
--disable-shared
|
||||
--enable-static
|
||||
--with-pic
|
||||
--with-ogg=${LIBDIR}/ogg
|
||||
BUILD_COMMAND ${CONFIGURE_ENV} && cd ${BUILD_DIR}/vorbis/src/external_vorbis/ && make -j${MAKE_THREADS}
|
||||
INSTALL_COMMAND ${CONFIGURE_ENV} && cd ${BUILD_DIR}/vorbis/src/external_vorbis/ && make install
|
||||
INSTALL_DIR ${LIBDIR}/vorbis
|
||||
)
|
||||
else()
|
||||
ExternalProject_Add(external_vorbis
|
||||
URL file://${PACKAGE_DIR}/${VORBIS_FILE}
|
||||
DOWNLOAD_DIR ${DOWNLOAD_DIR}
|
||||
URL_HASH ${VORBIS_HASH_TYPE}=${VORBIS_HASH}
|
||||
PREFIX ${BUILD_DIR}/vorbis
|
||||
CONFIGURE_COMMAND ${CONFIGURE_ENV} && cd ${BUILD_DIR}/vorbis/src/external_vorbis/ && ${CONFIGURE_COMMAND} --prefix=${LIBDIR}/vorbis
|
||||
--disable-shared
|
||||
--enable-static
|
||||
--with-pic
|
||||
--with-ogg=${LIBDIR}/ogg
|
||||
BUILD_COMMAND ${CONFIGURE_ENV} && cd ${BUILD_DIR}/vorbis/src/external_vorbis/ && make -j${MAKE_THREADS}
|
||||
INSTALL_COMMAND ${CONFIGURE_ENV} && cd ${BUILD_DIR}/vorbis/src/external_vorbis/ && make install
|
||||
INSTALL_DIR ${LIBDIR}/vorbis
|
||||
)
|
||||
URL file://${PACKAGE_DIR}/${VORBIS_FILE}
|
||||
DOWNLOAD_DIR ${DOWNLOAD_DIR}
|
||||
URL_HASH ${VORBIS_HASH_TYPE}=${VORBIS_HASH}
|
||||
PREFIX ${BUILD_DIR}/vorbis
|
||||
CMAKE_ARGS -DCMAKE_INSTALL_PREFIX=${LIBDIR}/vorbis -DOGG_ROOT=${LIBDIR}/ogg ${DEFAULT_CMAKE_FLAGS}
|
||||
INSTALL_DIR ${LIBDIR}/vorbis
|
||||
)
|
||||
endif()
|
||||
|
||||
add_dependencies(
|
||||
external_vorbis
|
||||
external_ogg
|
||||
)
|
||||
|
||||
if(MSVC)
|
||||
set_target_properties(external_vorbis PROPERTIES FOLDER Mingw)
|
||||
endif()
|
||||
|
|
|
@ -1,3 +1,5 @@
|
|||
# SPDX-FileCopyrightText: 2017-2023 Blender Foundation
|
||||
#
|
||||
# SPDX-License-Identifier: GPL-2.0-or-later
|
||||
|
||||
if(WIN32)
|
||||
|
@ -6,8 +8,32 @@ if(WIN32)
|
|||
# if it cannot find pthread.h it'll happily provide a pthread emulation
|
||||
# layer using win32 threads. So all this patch does is make it not find
|
||||
# pthead.h
|
||||
|
||||
set(VPX_PATCH ${PATCH_CMD} -p 1 -d ${BUILD_DIR}/vpx/src/external_vpx < ${PATCH_DIR}/vpx_windows.diff)
|
||||
set(VPX_EXTRA_FLAGS --target=x86_64-win64-gcc )
|
||||
|
||||
if(MSVC_VERSION GREATER_EQUAL 1920) # 2019
|
||||
set(VPX_COMPILER_STRING vs16)
|
||||
else() # 2017
|
||||
set(VPX_COMPILER_STRING vs15)
|
||||
endif()
|
||||
|
||||
if(BLENDER_PLATFORM_ARM)
|
||||
# ARM64 requires a min of vc142
|
||||
set(VPX_EXTRA_FLAGS --target=arm64-win64-vs16 --as=nasm)
|
||||
set(VPX_INCL_ARCH nopost-nodocs-arm64)
|
||||
else()
|
||||
set(VPX_EXTRA_FLAGS --target=x86_64-win64-${VPX_COMPILER_STRING} --as=nasm)
|
||||
set(VPX_INCL_ARCH nodocs-x86_64-win64)
|
||||
endif()
|
||||
|
||||
set(VPX_CONFIGURE_COMMAND ${CONFIGURE_ENV_MSVC})
|
||||
|
||||
set(VPX_INCLUDE_PATH ${BUILD_DIR}/vpx/src/external_vpx/vpx-vp8-vp9-${VPX_INCL_ARCH}md-${VPX_COMPILER_STRING}-v${VPX_VERSION})
|
||||
|
||||
set(VPX_BUILD_COMMAND ${CONFIGURE_ENV} && cd ${BUILD_DIR}/vpx/src/external_vpx/ && make dist && msbuild /m vpx.sln /p:OutDir=${BUILD_DIR}/vpx/src/external_vpx-build/ /p:Configuration=Release)
|
||||
set(VPX_INSTALL_COMMAND ${CONFIGURE_ENV} && ${CMAKE_COMMAND} -E copy_directory ${VPX_INCLUDE_PATH}/include ${LIBDIR}/vpx/include &&
|
||||
${CMAKE_COMMAND} -E copy_directory ${BUILD_DIR}/vpx/src/external_vpx-build/ ${LIBDIR}/vpx/lib/ &&
|
||||
${CMAKE_COMMAND} -E copy ${LIBDIR}/vpx/lib/vpxmd.lib ${LIBDIR}/vpx/lib/vpx.lib)
|
||||
else()
|
||||
if(APPLE)
|
||||
if("${CMAKE_OSX_ARCHITECTURES}" STREQUAL "arm64")
|
||||
|
@ -18,6 +44,11 @@ else()
|
|||
else()
|
||||
set(VPX_EXTRA_FLAGS --target=generic-gnu)
|
||||
endif()
|
||||
|
||||
set(VPX_CONFIGURE_COMMAND ${CONFIGURE_ENV})
|
||||
|
||||
set(VPX_BUILD_COMMAND ${CONFIGURE_ENV} && cd ${BUILD_DIR}/vpx/src/external_vpx/ && make -j${MAKE_THREADS})
|
||||
set(VPX_INSTALL_COMMAND ${CONFIGURE_ENV} && cd ${BUILD_DIR}/vpx/src/external_vpx/ && make install)
|
||||
endif()
|
||||
|
||||
if(NOT BLENDER_PLATFORM_ARM)
|
||||
|
@ -35,7 +66,7 @@ ExternalProject_Add(external_vpx
|
|||
DOWNLOAD_DIR ${DOWNLOAD_DIR}
|
||||
URL_HASH ${VPX_HASH_TYPE}=${VPX_HASH}
|
||||
PREFIX ${BUILD_DIR}/vpx
|
||||
CONFIGURE_COMMAND ${CONFIGURE_ENV} &&
|
||||
CONFIGURE_COMMAND ${VPX_CONFIGURE_COMMAND} &&
|
||||
cd ${BUILD_DIR}/vpx/src/external_vpx/ &&
|
||||
${CONFIGURE_COMMAND_NO_TARGET} --prefix=${LIBDIR}/vpx
|
||||
--disable-shared
|
||||
|
@ -47,8 +78,8 @@ ExternalProject_Add(external_vpx
|
|||
--enable-vp8
|
||||
--enable-vp9
|
||||
${VPX_EXTRA_FLAGS}
|
||||
BUILD_COMMAND ${CONFIGURE_ENV} && cd ${BUILD_DIR}/vpx/src/external_vpx/ && make -j${MAKE_THREADS}
|
||||
INSTALL_COMMAND ${CONFIGURE_ENV} && cd ${BUILD_DIR}/vpx/src/external_vpx/ && make install
|
||||
BUILD_COMMAND ${VPX_BUILD_COMMAND}
|
||||
INSTALL_COMMAND ${VPX_INSTALL_COMMAND}
|
||||
PATCH_COMMAND ${VPX_PATCH}
|
||||
INSTALL_DIR ${LIBDIR}/vpx
|
||||
)
|
||||
|
|
|
@ -1,3 +1,5 @@
|
|||
# SPDX-FileCopyrightText: 2022 Blender Foundation
|
||||
#
|
||||
# SPDX-License-Identifier: GPL-2.0-or-later
|
||||
|
||||
set(VULKAN_HEADERS_EXTRA_ARGS)
|
||||
|
|
|
@ -1,3 +1,5 @@
|
|||
# SPDX-FileCopyrightText: 2022-2023 Blender Foundation
|
||||
#
|
||||
# SPDX-License-Identifier: GPL-2.0-or-later
|
||||
|
||||
ExternalProject_Add(external_wayland
|
||||
|
|
|
@ -1,3 +1,5 @@
|
|||
# SPDX-FileCopyrightText: 2022 Blender Foundation
|
||||
#
|
||||
# SPDX-License-Identifier: GPL-2.0-or-later
|
||||
|
||||
# NOTE: currently only the header file is extracted, no compilation is needed
|
||||
|
|
|
@ -1,3 +1,5 @@
|
|||
# SPDX-FileCopyrightText: 2002-2023 Blender Foundation
|
||||
#
|
||||
# SPDX-License-Identifier: GPL-2.0-or-later
|
||||
|
||||
ExternalProject_Add(external_wayland_protocols
|
||||
|
|
|
@ -1,3 +1,5 @@
|
|||
# SPDX-FileCopyrightText: 2017-2022 Blender Foundation
|
||||
#
|
||||
# SPDX-License-Identifier: GPL-2.0-or-later
|
||||
|
||||
# Note the utility apps may use png/tiff/gif system libraries, but the
|
||||
|
|
|
@ -1,7 +1,9 @@
|
|||
# SPDX-FileCopyrightText: 2002-2023 Blender Foundation
|
||||
#
|
||||
# SPDX-License-Identifier: GPL-2.0-or-later
|
||||
|
||||
if(WIN32)
|
||||
set(X264_EXTRA_ARGS --enable-win32thread --cross-prefix=${MINGW_HOST}- --host=${MINGW_HOST})
|
||||
set(X264_EXTRA_ARGS --enable-win32thread)
|
||||
endif()
|
||||
|
||||
if(BLENDER_PLATFORM_ARM)
|
||||
|
@ -10,10 +12,12 @@ endif()
|
|||
|
||||
if((APPLE AND NOT BLENDER_PLATFORM_ARM) OR (UNIX AND NOT APPLE))
|
||||
set(X264_CONFIGURE_ENV
|
||||
export AS=${LIBDIR}/nasm/bin/nasm
|
||||
${CONFIGURE_ENV} && export AS=${LIBDIR}/nasm/bin/nasm
|
||||
)
|
||||
elseif(WIN32)
|
||||
set(X264_CONFIGURE_ENV ${CONFIGURE_ENV_NO_PERL})
|
||||
else()
|
||||
set(X264_CONFIGURE_ENV echo .)
|
||||
set(X264_CONFIGURE_ENV ${CONFIGURE_ENV})
|
||||
endif()
|
||||
|
||||
ExternalProject_Add(external_x264
|
||||
|
@ -21,14 +25,14 @@ ExternalProject_Add(external_x264
|
|||
DOWNLOAD_DIR ${DOWNLOAD_DIR}
|
||||
URL_HASH ${X264_HASH_TYPE}=${X264_HASH}
|
||||
PREFIX ${BUILD_DIR}/x264
|
||||
CONFIGURE_COMMAND ${CONFIGURE_ENV} && ${X264_CONFIGURE_ENV} && cd ${BUILD_DIR}/x264/src/external_x264/ &&
|
||||
CONFIGURE_COMMAND ${X264_CONFIGURE_ENV} && cd ${BUILD_DIR}/x264/src/external_x264/ &&
|
||||
${CONFIGURE_COMMAND} --prefix=${LIBDIR}/x264
|
||||
--enable-static
|
||||
--enable-pic
|
||||
--disable-lavf
|
||||
${X264_EXTRA_ARGS}
|
||||
BUILD_COMMAND ${CONFIGURE_ENV} && cd ${BUILD_DIR}/x264/src/external_x264/ && make -j${MAKE_THREADS}
|
||||
INSTALL_COMMAND ${CONFIGURE_ENV} && cd ${BUILD_DIR}/x264/src/external_x264/ && make install
|
||||
BUILD_COMMAND ${X264_CONFIGURE_ENV} && cd ${BUILD_DIR}/x264/src/external_x264/ && make -j${MAKE_THREADS}
|
||||
INSTALL_COMMAND ${X264_CONFIGURE_ENV} && cd ${BUILD_DIR}/x264/src/external_x264/ && make install
|
||||
INSTALL_DIR ${LIBDIR}/x264
|
||||
)
|
||||
|
||||
|
|
|
@ -1,3 +1,5 @@
|
|||
# SPDX-FileCopyrightText: 2002-2023 Blender Foundation
|
||||
#
|
||||
# SPDX-License-Identifier: GPL-2.0-or-later
|
||||
|
||||
if(WIN32)
|
||||
|
|
Some files were not shown because too many files have changed in this diff Show More
Loading…
Reference in New Issue