Revert "Deps_builder: Move Windows build from MinGW/GCC to msys2/MSVC"

This reverts commit 451751380c.

Seems like this broke linux/mac, likely needs to detect of libxvid
is there or not. For now revert until we sort this out.
This commit is contained in:
Ray Molenkamp
2023-06-10 16:24:17 -06:00
parent 451751380c
commit b7b2e08dcb
39 changed files with 554 additions and 1066 deletions

View File

@@ -41,8 +41,8 @@ include(cmake/boost_build_options.cmake)
include(cmake/download.cmake)
include(cmake/macros.cmake)
if(ENABLE_MSYS2)
include(cmake/setup_msys2.cmake)
if(ENABLE_MINGW64)
include(cmake/setup_mingw64.cmake)
else()
set(mingw_LIBDIR ${LIBDIR})
endif()
@@ -129,10 +129,13 @@ if(NOT APPLE)
include(cmake/level-zero.cmake)
endif()
if(NOT WIN32 OR ENABLE_MSYS2)
if(NOT WIN32 OR ENABLE_MINGW64)
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)
@@ -140,12 +143,16 @@ if(NOT WIN32 OR ENABLE_MSYS2)
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)

View File

@@ -1,6 +1,15 @@
# SPDX-License-Identifier: GPL-2.0-or-later
if(NOT WIN32)
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")
set(AOM_CMAKE_FLAGS ${DEFAULT_CMAKE_FLAGS})
endif()
@@ -25,7 +34,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} -DCMAKE_INSTALL_PREFIX=${LIBDIR}/aom ${AOM_CMAKE_FLAGS} ${AOM_EXTRA_ARGS} ${BUILD_DIR}/aom/src/external_aom/
${CMAKE_COMMAND} -G "${AOM_GENERATOR}" -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

View File

@@ -106,6 +106,7 @@ download_source(FLAC)
download_source(VPX)
download_source(OPUS)
download_source(X264)
download_source(XVIDCORE)
download_source(OPENJPEG)
download_source(FFMPEG)
download_source(FFTW)

View File

@@ -1,11 +1,9 @@
# SPDX-License-Identifier: GPL-2.0-or-later
if(NOT WIN32)
set(temp_LIBDIR ${LIBDIR})
set(LIBDIR_FLAG "-L")
if(WIN32)
set(temp_LIBDIR ${mingw_LIBDIR})
else()
set(temp_LIBDIR ${msys2_LIBDIR})
set(LIBDIR_FLAG "-LIBPATH:")
set(temp_LIBDIR ${LIBDIR})
endif()
set(FFMPEG_CFLAGS "\
@@ -17,57 +15,28 @@ 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 "\
${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"
-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"
)
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:\
@@ -79,11 +48,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
@@ -92,31 +61,7 @@ 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}
@@ -124,8 +69,6 @@ else()
--disable-shared
--enable-libopenjpeg
)
set(FFMPEG_CONFIGURE_COMMAND ${CONFIGURE_ENV_NO_PERL})
endif()
if(APPLE)
@@ -145,9 +88,13 @@ ExternalProject_Add(external_ffmpeg
URL file://${PACKAGE_DIR}/${FFMPEG_FILE}
DOWNLOAD_DIR ${DOWNLOAD_DIR}
URL_HASH ${FFMPEG_HASH_TYPE}=${FFMPEG_HASH}
PATCH_COMMAND ${PATCH_CMD} --verbose -p 1 -N -d ${BUILD_DIR}/ffmpeg/src/external_ffmpeg < ${FFMPEG_PATCH_FILE}
# 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
PREFIX ${BUILD_DIR}/ffmpeg
CONFIGURE_COMMAND ${FFMPEG_CONFIGURE_COMMAND} &&
CONFIGURE_COMMAND ${CONFIGURE_ENV_NO_PERL} &&
cd ${BUILD_DIR}/ffmpeg/src/external_ffmpeg/ &&
${FFMPEG_ENV} ${CONFIGURE_COMMAND_NO_TARGET} ${FFMPEG_EXTRA_FLAGS}
--disable-lzma
@@ -171,6 +118,7 @@ ExternalProject_Add(external_ffmpeg
--enable-libmp3lame
--disable-librtmp
--enable-libx264
--enable-libxvid
--enable-libaom
--disable-libopencore-amrnb
--disable-libopencore-amrwb
@@ -196,8 +144,8 @@ ExternalProject_Add(external_ffmpeg
--disable-outdev=alsa
--disable-crystalhd
--disable-sndio
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
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
CMAKE_ARGS -DCMAKE_INSTALL_PREFIX=${LIBDIR}/ffmpeg ${DEFAULT_CMAKE_FLAGS}
INSTALL_DIR ${LIBDIR}/ffmpeg
)
@@ -209,6 +157,8 @@ endif()
add_dependencies(
external_ffmpeg
external_zlib
external_openjpeg
external_xvidcore
external_x264
external_opus
external_vpx
@@ -217,21 +167,17 @@ add_dependencies(
external_ogg
external_lame
external_aom
external_sndfile
external_flac
)
if(WIN32)
add_dependencies(
external_ffmpeg
external_zlib
external_openjpeg_msvc
external_zlib_mingw
)
endif()
if(UNIX)
add_dependencies(
external_ffmpeg
external_nasm
external_openjpeg
)
endif()

View File

@@ -4,48 +4,41 @@ set(FFTW_EXTRA_ARGS)
macro(fftw_build FFTW_POSTFIX)
if(WIN32)
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
)
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)
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/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/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/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/fftw3f.lib ${HARVEST_TARGET}/fftw3/lib/fftw3f.lib
COMMAND ${CMAKE_COMMAND} -E copy ${LIBDIR}/fftw3/bin/fftw3f.dll ${HARVEST_TARGET}/fftw3/lib/fftw3f.dll
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
DEPENDEES install
)
endif()

View File

@@ -1,45 +1,16 @@
# SPDX-License-Identifier: GPL-2.0-or-later
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()
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(MSVC)
add_dependencies(
external_flac
external_ogg
)
set_target_properties(external_flac PROPERTIES FOLDER Mingw)
endif()

View File

@@ -3,25 +3,9 @@
set(GMP_EXTRA_ARGS -enable-cxx)
if(WIN32)
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()
# 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)
else()
set(GMP_CONFIGURE_ENV ${CONFIGURE_ENV_NO_PERL})
set(GMP_OPTIONS --enable-static --disable-shared )
endif()
@@ -52,22 +36,37 @@ 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 ${GMP_CONFIGURE_ENV} && cd ${BUILD_DIR}/gmp/src/external_gmp/ && ${CONFIGURE_COMMAND} --prefix=${LIBDIR}/gmp ${GMP_OPTIONS} ${GMP_EXTRA_ARGS}
CONFIGURE_COMMAND ${CONFIGURE_ENV_NO_PERL} && 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 ${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 ${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_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
@@ -79,9 +78,10 @@ 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/gmp.dll.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/libgmp-10.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

View File

@@ -262,6 +262,7 @@ 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")

View File

@@ -4,7 +4,7 @@ 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}/msys2/msys64/usr/bin/m4.exe
-DM4_EXECUTABLE=${DOWNLOAD_DIR}/mingw/mingw64/msys/1.0/bin/m4.exe
-DARM_ENABLED=Off
-DPython3_FIND_REGISTRY=NEVER
)

View File

@@ -2,24 +2,9 @@
set(LAME_EXTRA_ARGS)
if(MSVC)
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
--with-pic
--disable-mp3x
--disable-mp3rtp
--disable-gtktest
--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)
if("${CMAKE_SIZEOF_VOID_P}" EQUAL "4")
set(LAME_EXTRA_ARGS CFLAGS=-msse)
endif()
endif()
ExternalProject_Add(external_lame
@@ -27,9 +12,20 @@ ExternalProject_Add(external_lame
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}
CONFIGURE_COMMAND ${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
--with-pic
--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
INSTALL_DIR ${LIBDIR}/lame
)
if(MSVC)
set_target_properties(external_lame PROPERTIES FOLDER Mingw)
endif()

View File

@@ -1,24 +1,17 @@
# SPDX-License-Identifier: GPL-2.0-or-later
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
)
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)
endif()

View File

@@ -3,32 +3,36 @@
# 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(NOT WIN32)
set(OPENJPEG_EXTRA_ARGS ${DEFAULT_CMAKE_FLAGS})
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
)
if(WIN32)
set(OPENJPEG_EXTRA_ARGS -G "MSYS Makefiles" -DBUILD_PKGCONFIG_FILES=On)
else()
set(OPENJPEG_EXTRA_ARGS ${DEFAULT_CMAKE_FLAGS})
endif()
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)
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
@@ -41,7 +45,10 @@ else()
DEPENDEES install
)
endif()
endif()
endif()
set(OPENJPEG_LIBRARY libopenjp2${LIBEXT})
if(MSVC)
set_target_properties(external_openjpeg PROPERTIES FOLDER Mingw)
endif()

View File

@@ -1,7 +1,7 @@
# SPDX-License-Identifier: GPL-2.0-or-later
if(WIN32)
option(ENABLE_MSYS2 "Enable building of ffmpeg/libsndfile/fftw3/gmp by installing msys2" ON)
option(ENABLE_MINGW64 "Enable building of ffmpeg/iconv/libsndfile/fftw3 by installing mingw64" ON)
endif()
option(FORCE_CHECK_HASH "Force a check of all hashses during CMake the configure phase" OFF)
@@ -39,7 +39,7 @@ message("PATCH_DIR = ${PATCH_DIR}")
message("BUILD_DIR = ${BUILD_DIR}")
if(WIN32)
set(PATCH_CMD ${DOWNLOAD_DIR}/msys2/msys64/usr/bin/patch.exe)
set(PATCH_CMD ${DOWNLOAD_DIR}/mingw/mingw64/msys/1.0/bin/patch.exe)
set(LIBEXT ".lib")
set(SHAREDLIBEXT ".lib")
set(LIBPREFIX "")
@@ -99,14 +99,11 @@ if(WIN32)
set(PLATFORM_CXX_FLAGS)
set(PLATFORM_CMAKE_FLAGS)
set(MINGW_PATH ${DOWNLOAD_DIR}/msys2/msys64/)
set(MINGW_PATH ${DOWNLOAD_DIR}/mingw/mingw64)
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.
@@ -124,21 +121,16 @@ if(WIN32)
call ${PERL_SHELL} &&
call ${MINGW_SHELL} &&
set path &&
set CC=cl &&
set CXX=cl &&
set CFLAGS=${MINGW_CFLAGS} &&
set LDFLAGS=${MINGW_LDFLAGS}
set CFLAGS=-g &&
set LDFLAGS=-Wl,--as-needed -static-libgcc
)
set(CONFIGURE_ENV_NO_PERL
cd ${MINGW_PATH} &&
call ${MINGW_SHELL} &&
set path &&
set CC=cl &&
set CXX=cl &&
set LD=link &&
set CFLAGS=${MINGW_CFLAGS} &&
set LDFLAGS=${MINGW_LDFLAGS}
set CFLAGS=-g &&
set LDFLAGS=-Wl,--as-needed -static-libgcc
)
set(CONFIGURE_COMMAND sh ./configure)

View File

@@ -1,36 +1,20 @@
# SPDX-License-Identifier: GPL-2.0-or-later
if(MSVC)
set(OPUS_CMAKE_ARGS
-DPACKAGE_VERSION=${OPUS_VERSION}
-DOPUS_BUILD_PROGRAMS=OFF
-DOPUS_BUILD_TESTING=OFF
)
endif()
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(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
)
if(MSVC)
set_target_properties(external_opus PROPERTIES FOLDER Mingw)
endif()

View File

@@ -0,0 +1,219 @@
# 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()

View File

@@ -1,154 +0,0 @@
# 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()

View File

@@ -3,60 +3,33 @@
set(SNDFILE_EXTRA_ARGS)
set(SNDFILE_ENV)
if(NOT WIN32)
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()
set(SNDFILE_OPTIONS --enable-static --disable-shared )
endif()
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")
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
)
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
)
if(MSVC)
set_target_properties(external_sndfile PROPERTIES FOLDER Mingw)
endif()
add_dependencies(
@@ -64,5 +37,21 @@ 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()

View File

@@ -6,41 +6,30 @@ else()
set(THEORA_CONFIGURE_ENV ${CONFIGURE_ENV})
endif()
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()
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
)
add_dependencies(
external_theora
external_vorbis
external_ogg
)
if(MSVC)
set_target_properties(external_theora PROPERTIES FOLDER Mingw)
endif()

View File

@@ -321,6 +321,12 @@ 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)

View File

@@ -1,32 +1,25 @@
# 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
CMAKE_ARGS -DCMAKE_INSTALL_PREFIX=${LIBDIR}/vorbis -DOGG_ROOT=${LIBDIR}/ogg ${DEFAULT_CMAKE_FLAGS}
INSTALL_DIR ${LIBDIR}/vorbis
)
endif()
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
)
add_dependencies(
external_vorbis
external_ogg
)
if(MSVC)
set_target_properties(external_vorbis PROPERTIES FOLDER Mingw)
endif()

View File

@@ -6,32 +6,8 @@ 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)
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)
set(VPX_EXTRA_FLAGS --target=x86_64-win64-gcc )
else()
if(APPLE)
if("${CMAKE_OSX_ARCHITECTURES}" STREQUAL "arm64")
@@ -42,11 +18,6 @@ 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)
@@ -64,7 +35,7 @@ ExternalProject_Add(external_vpx
DOWNLOAD_DIR ${DOWNLOAD_DIR}
URL_HASH ${VPX_HASH_TYPE}=${VPX_HASH}
PREFIX ${BUILD_DIR}/vpx
CONFIGURE_COMMAND ${VPX_CONFIGURE_COMMAND} &&
CONFIGURE_COMMAND ${CONFIGURE_ENV} &&
cd ${BUILD_DIR}/vpx/src/external_vpx/ &&
${CONFIGURE_COMMAND_NO_TARGET} --prefix=${LIBDIR}/vpx
--disable-shared
@@ -76,8 +47,8 @@ ExternalProject_Add(external_vpx
--enable-vp8
--enable-vp9
${VPX_EXTRA_FLAGS}
BUILD_COMMAND ${VPX_BUILD_COMMAND}
INSTALL_COMMAND ${VPX_INSTALL_COMMAND}
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
PATCH_COMMAND ${VPX_PATCH}
INSTALL_DIR ${LIBDIR}/vpx
)

View File

@@ -1,7 +1,7 @@
# SPDX-License-Identifier: GPL-2.0-or-later
if(WIN32)
set(X264_EXTRA_ARGS --enable-win32thread)
set(X264_EXTRA_ARGS --enable-win32thread --cross-prefix=${MINGW_HOST}- --host=${MINGW_HOST})
endif()
if(BLENDER_PLATFORM_ARM)
@@ -10,12 +10,10 @@ endif()
if((APPLE AND NOT BLENDER_PLATFORM_ARM) OR (UNIX AND NOT APPLE))
set(X264_CONFIGURE_ENV
${CONFIGURE_ENV} && export AS=${LIBDIR}/nasm/bin/nasm
export AS=${LIBDIR}/nasm/bin/nasm
)
elseif(WIN32)
set(X264_CONFIGURE_ENV ${CONFIGURE_ENV_NO_PERL})
else()
set(X264_CONFIGURE_ENV ${CONFIGURE_ENV})
set(X264_CONFIGURE_ENV echo .)
endif()
ExternalProject_Add(external_x264
@@ -23,14 +21,14 @@ ExternalProject_Add(external_x264
DOWNLOAD_DIR ${DOWNLOAD_DIR}
URL_HASH ${X264_HASH_TYPE}=${X264_HASH}
PREFIX ${BUILD_DIR}/x264
CONFIGURE_COMMAND ${X264_CONFIGURE_ENV} && cd ${BUILD_DIR}/x264/src/external_x264/ &&
CONFIGURE_COMMAND ${CONFIGURE_ENV} && ${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 ${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
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
INSTALL_DIR ${LIBDIR}/x264
)

View File

@@ -0,0 +1,30 @@
# SPDX-License-Identifier: GPL-2.0-or-later
if(WIN32)
set(XVIDCORE_EXTRA_ARGS --host=${MINGW_HOST})
endif()
ExternalProject_Add(external_xvidcore
URL file://${PACKAGE_DIR}/${XVIDCORE_FILE}
DOWNLOAD_DIR ${DOWNLOAD_DIR}
URL_HASH ${XVIDCORE_HASH_TYPE}=${XVIDCORE_HASH}
PREFIX ${BUILD_DIR}/xvidcore
CONFIGURE_COMMAND ${CONFIGURE_ENV} && cd ${BUILD_DIR}/xvidcore/src/external_xvidcore/build/generic && ${CONFIGURE_COMMAND} --prefix=${LIBDIR}/xvidcore ${XVIDCORE_EXTRA_ARGS}
BUILD_COMMAND ${CONFIGURE_ENV} && cd ${BUILD_DIR}/xvidcore/src/external_xvidcore/build/generic && make -j${MAKE_THREADS}
INSTALL_COMMAND ${CONFIGURE_ENV} &&
${CMAKE_COMMAND} -E remove ${LIBDIR}/xvidcore/lib/* && # clean because re-installing fails otherwise
cd ${BUILD_DIR}/xvidcore/src/external_xvidcore/build/generic && make install
INSTALL_DIR ${LIBDIR}/xvidcore
)
if(WIN32)
ExternalProject_Add_Step(external_xvidcore after_install
COMMAND ${CMAKE_COMMAND} -E rename ${LIBDIR}/xvidcore/lib/xvidcore.a ${LIBDIR}/xvidcore/lib/libxvidcore.a || true
COMMAND ${CMAKE_COMMAND} -E remove ${LIBDIR}/xvidcore/lib/xvidcore.dll.a
DEPENDEES install
)
endif()
if(MSVC)
set_target_properties(external_xvidcore PROPERTIES FOLDER Mingw)
endif()

View File

@@ -1,16 +1,9 @@
# SPDX-License-Identifier: GPL-2.0-or-later
if(MSVC)
set(ZLIB_PATCH_COMMAND ${PATCH_CMD} -p 1 -d ${BUILD_DIR}/zlib/src/external_zlib < ${PATCH_DIR}/zlib.diff)
else()
set(ZLIB_PATCH_COMMAND echo .)
endif()
ExternalProject_Add(external_zlib
URL file://${PACKAGE_DIR}/${ZLIB_FILE}
URL_HASH ${ZLIB_HASH_TYPE}=${ZLIB_HASH}
PREFIX ${BUILD_DIR}/zlib
PATCH_COMMAND ${ZLIB_PATCH_COMMAND}
CMAKE_ARGS -DCMAKE_POSITION_INDEPENDENT_CODE=ON -DCMAKE_INSTALL_PREFIX=${LIBDIR}/zlib ${DEFAULT_CMAKE_FLAGS}
INSTALL_DIR ${LIBDIR}/zlib
)
@@ -20,17 +13,12 @@ if(WIN32)
ExternalProject_Add_Step(external_zlib after_install
COMMAND ${CMAKE_COMMAND} -E copy ${LIBDIR}/zlib/lib/zlibstatic${LIBEXT} ${HARVEST_TARGET}/zlib/lib/libz_st${LIBEXT}
COMMAND ${CMAKE_COMMAND} -E copy_directory ${LIBDIR}/zlib/include/ ${HARVEST_TARGET}/zlib/include/
COMMAND ${CMAKE_COMMAND} -E rm -f ${LIBDIR}/zlib/bin/zlib.dll
COMMAND ${CMAKE_COMMAND} -E rm -f ${LIBDIR}/zlib/lib/zlib.lib
COMMAND ${CMAKE_COMMAND} -E copy ${LIBDIR}/zlib/lib/zlibstatic${LIBEXT} ${LIBDIR}/zlib/lib/zlib${LIBEXT}
DEPENDEES install
)
endif()
if(BUILD_MODE STREQUAL Debug)
ExternalProject_Add_Step(external_zlib after_install
COMMAND ${CMAKE_COMMAND} -E copy ${LIBDIR}/zlib/lib/zlibstaticd${LIBEXT} ${HARVEST_TARGET}/zlib/lib/libz_st_d${LIBEXT}
COMMAND ${CMAKE_COMMAND} -E rm -f ${LIBDIR}/zlib/bin/zlib.dll
COMMAND ${CMAKE_COMMAND} -E rm -f ${LIBDIR}/zlib/lib/zlib.lib
DEPENDEES install
)
endif()

View File

@@ -18,6 +18,7 @@ graph[autosize = false, size = "25.7,8.3!", resolution = 300];
external_embree -- external_tbb;
external_ffmpeg -- external_zlib;
external_ffmpeg -- external_openjpeg;
external_ffmpeg -- external_xvidcore;
external_ffmpeg -- external_x264;
external_ffmpeg -- external_opus;
external_ffmpeg -- external_vpx;

View File

@@ -1,68 +0,0 @@
# Backported (with some minor modifications) from libsndfile 1.2.0
# - Find lame
# Find the native lame includes and libraries
#
# LAME_INCLUDE_DIRS - where to find lame.h, etc.
# LAME_LIBRARIES - List of libraries when using lame.
# LAME_FOUND - True if Lame found.
if (LAME_INCLUDE_DIR)
# Already in cache, be silent
set(LAME_FIND_QUIETLY TRUE)
endif ()
find_path (LAME_INCLUDE_DIR lame/lame.h
HINTS
${LAME_ROOT}
)
# MSVC built lame may be named mp3lame_static.
# The provided project files name the library with the lib prefix.
find_library (LAME_LIBRARY
NAMES
mp3lame
mp3lame_static
libmp3lame
libmp3lame_static
libmp3lame-static
HINTS
${LAME_ROOT}
)
find_library (LAME_HIP_LIBRARY
NAMES
mpghip-static
libmpghip-static
HINTS
${LAME_ROOT}
)
# Handle the QUIETLY and REQUIRED arguments and set LAME_FOUND
# to TRUE if all listed variables are TRUE.
include(FindPackageHandleStandardArgs)
find_package_handle_standard_args (Lame
REQUIRED_VARS
LAME_LIBRARY
LAME_INCLUDE_DIR
)
if (LAME_FOUND)
set (LAME_LIBRARIES ${LAME_LIBRARY} ${LAME_HIP_LIBRARY})
set (LAME_INCLUDE_DIRS ${LAME_INCLUDE_DIR})
if (NOT TARGET Lame::Lame)
add_library (Lame::Lame UNKNOWN IMPORTED)
set_target_properties (Lame::Lame PROPERTIES
INTERFACE_INCLUDE_DIRECTORIES "${LAME_INCLUDE_DIRS}"
IMPORTED_LOCATION "${LAME_LIBRARY}"
)
if (LAME_HIP_LIBRARY)
set_property (TARGET Lame::Lame APPEND PROPERTY
INTERFACE_LINK_LIBRARIES "${LAME_HIP_LIBRARY}")
endif ()
endif ()
endif ()
mark_as_advanced(LAME_INCLUDE_DIR LAME_LIBRARY LAME_HIP_LIBRARY)

View File

@@ -1,101 +0,0 @@
# Based on the VCPKG version of theora
cmake_minimum_required(VERSION 3.0)
project(theora LANGUAGES C)
set(CMAKE_MODULE_PATH "${PROJECT_SOURCE_DIR}")
FIND_PACKAGE(OGG REQUIRED)
file(GLOB HEADERS
"include/theora/codec.h"
"include/theora/theora.h"
"include/theora/theoradec.h"
"include/theora/theoraenc.h"
)
include_directories("include")
include_directories(${OGG_INCLUDE_DIR})
set(LIBTHEORA_COMMON
"lib/apiwrapper.c"
"lib/bitpack.c"
"lib/dequant.c"
"lib/fragment.c"
"lib/idct.c"
"lib/info.c"
"lib/internal.c"
"lib/state.c"
"lib/quant.c"
"lib/x86_vc/mmxfrag.c"
"lib/x86_vc/mmxidct.c"
"lib/x86_vc/mmxstate.c"
"lib/x86_vc/x86state.c"
)
set(LIBTHEORA_ENC
"lib/analyze.c"
"lib/encapiwrapper.c"
"lib/encfrag.c"
"lib/encinfo.c"
"lib/encode.c"
"lib/enquant.c"
"lib/fdct.c"
"lib/huffenc.c"
"lib/mathops.c"
"lib/mcenc.c"
"lib/rate.c"
"lib/tokenize.c"
"lib/x86_vc/mmxencfrag.c"
"lib/x86_vc/mmxfdct.c"
"lib/x86_vc/x86enc.c"
)
set(LIBTHEORA_DEC
"lib/decapiwrapper.c"
"lib/decinfo.c"
"lib/decode.c"
"lib/huffdec.c"
)
add_definitions(-D_CRT_SECURE_NO_DEPRECATE)
add_definitions(-D_CRT_NONSTDC_NO_DEPRECATE)
add_library(theora-common OBJECT ${LIBTHEORA_COMMON} ${HEADERS})
add_library(theora-enc OBJECT ${LIBTHEORA_ENC} ${HEADERS})
add_library(theora-dec OBJECT ${LIBTHEORA_DEC} ${HEADERS})
add_library(theora $<TARGET_OBJECTS:theora-common> $<TARGET_OBJECTS:theora-enc> $<TARGET_OBJECTS:theora-dec> "libtheora.def")
target_link_libraries(theora ${OGG_LIBRARY})
add_library(theoraenc $<TARGET_OBJECTS:theora-common> $<TARGET_OBJECTS:theora-enc> "win32/xmingw32/libtheoraenc-all.def")
target_link_libraries(theoraenc ${OGG_LIBRARY})
add_library(theoradec $<TARGET_OBJECTS:theora-common> $<TARGET_OBJECTS:theora-dec> "win32/xmingw32/libtheoradec-all.def")
target_link_libraries(theoradec ${OGG_LIBRARY})
# pkgconfig vars
set(prefix ${LIBDIR}/theora)
set(exec_prefix ${LIBDIR}/theora/bin)
set(libdir ${LIBDIR}/theora/lib)
set(includedir ${LIBDIR}/theora/include)
configure_file(
${CMAKE_CURRENT_SOURCE_DIR}/theora.pc.in
${CMAKE_CURRENT_BINARY_DIR}/theora.pc
@ONLY
)
install(
FILES ${CMAKE_CURRENT_BINARY_DIR}/theora.pc
DESTINATION lib/pkgconfig
)
install(FILES ${HEADERS} DESTINATION include/theora)
install(TARGETS theora theoraenc theoradec
RUNTIME DESTINATION bin
LIBRARY DESTINATION bin
ARCHIVE DESTINATION lib
)

View File

@@ -1,52 +0,0 @@
diff -Naur ffmpeg-clean/configure ffmpeg-dirty/configure
--- ffmpeg-clean/configure 2023-02-27 20:43:45.000000000 +0000
+++ ffmpeg-dirty/configure 2023-05-25 09:49:24.949566500 +0100
@@ -6563,7 +6563,7 @@
enabled jni && { [ $target_os = "android" ] && check_headers jni.h && enabled pthreads || die "ERROR: jni not found"; }
enabled ladspa && require_headers "ladspa.h dlfcn.h"
enabled lcms2 && require_pkg_config lcms2 "lcms2 >= 2.13" lcms2.h cmsCreateContext
-enabled libaom && require_pkg_config libaom "aom >= 1.0.0" aom/aom_codec.h aom_codec_version
+enabled libaom && { require libaom aom/aom_codec.h aom_codec_version -laom; }
enabled libaribb24 && { check_pkg_config libaribb24 "aribb24 > 1.0.3" "aribb24/aribb24.h" arib_instance_new ||
{ enabled gpl && require_pkg_config libaribb24 aribb24 "aribb24/aribb24.h" arib_instance_new; } ||
die "ERROR: libaribb24 requires version higher than 1.0.3 or --enable-gpl."; }
@@ -6654,16 +6654,15 @@
require libopencv opencv2/core/core_c.h cvCreateImageHeader -lopencv_core -lopencv_imgproc; } ||
require_pkg_config libopencv opencv opencv/cxcore.h cvCreateImageHeader; }
enabled libopenh264 && require_pkg_config libopenh264 openh264 wels/codec_api.h WelsGetCodecVersion
-enabled libopenjpeg && { check_pkg_config libopenjpeg "libopenjp2 >= 2.1.0" openjpeg.h opj_version ||
- { require_pkg_config libopenjpeg "libopenjp2 >= 2.1.0" openjpeg.h opj_version -DOPJ_STATIC && add_cppflags -DOPJ_STATIC; } }
+enabled libopenjpeg && require libopenjpeg openjpeg.h opj_version "-DOPJ_STATIC" -lopenjp2
enabled libopenmpt && require_pkg_config libopenmpt "libopenmpt >= 0.2.6557" libopenmpt/libopenmpt.h openmpt_module_create -lstdc++ && append libopenmpt_extralibs "-lstdc++"
enabled libopenvino && require libopenvino c_api/ie_c_api.h ie_c_api_version -linference_engine_c_api
enabled libopus && {
enabled libopus_decoder && {
- require_pkg_config libopus opus opus_multistream.h opus_multistream_decoder_create
+ require libopus opus_multistream.h opus_multistream_decoder_create -lopus
}
enabled libopus_encoder && {
- require_pkg_config libopus opus opus_multistream.h opus_multistream_surround_encoder_create
+ require libopus opus_multistream.h opus_multistream_encoder_create -lopus
}
}
enabled libplacebo && require_pkg_config libplacebo "libplacebo >= 4.192.0" libplacebo/vulkan.h pl_vulkan_create
@@ -6696,8 +6695,8 @@
enabled libvidstab && require_pkg_config libvidstab "vidstab >= 0.98" vid.stab/libvidstab.h vsMotionDetectInit
enabled libvmaf && require_pkg_config libvmaf "libvmaf >= 2.0.0" libvmaf.h vmaf_init
enabled libvo_amrwbenc && require libvo_amrwbenc vo-amrwbenc/enc_if.h E_IF_init -lvo-amrwbenc
-enabled libvorbis && require_pkg_config libvorbis vorbis vorbis/codec.h vorbis_info_init &&
- require_pkg_config libvorbisenc vorbisenc vorbis/vorbisenc.h vorbis_encode_init
+enabled libvorbis && require libvorbis vorbis/codec.h vorbis_info_init -lvorbis -logg -lvorbisfile &&
+ require libvorbisenc vorbis/vorbisenc.h vorbis_encode_init -lvorbis -lvorbisenc -logg -lvorbisfile
enabled libvpx && {
enabled libvpx_vp8_decoder && {
@@ -6724,7 +6723,7 @@
enabled libwebp && {
enabled libwebp_encoder && require_pkg_config libwebp "libwebp >= 0.2.0" webp/encode.h WebPGetEncoderVersion
enabled libwebp_anim_encoder && check_pkg_config libwebp_anim_encoder "libwebpmux >= 0.4.0" webp/mux.h WebPAnimEncoderOptionsInit; }
-enabled libx264 && require_pkg_config libx264 x264 "stdint.h x264.h" x264_encoder_encode &&
+enabled libx264 && require libx264 "stdint.h x264.h" x264_encoder_encode -lx264 &&
require_cpp_condition libx264 x264.h "X264_BUILD >= 122" && {
[ "$toolchain" != "msvc" ] ||
require_cpp_condition libx264 x264.h "X264_BUILD >= 158"; } &&

View File

@@ -1,66 +1,15 @@
diff -Naur gmp-6.2.1-clean/Makefile.am gmp-6.2.1-dirty/Makefile.am
--- gmp-6.2.1-clean/Makefile.am 2020-11-14 18:45:09.000000000 +0000
+++ gmp-6.2.1-dirty/Makefile.am 2023-01-24 13:06:03.527956700 +0000
@@ -112,7 +112,7 @@
LIBGMPXX_LT_AGE = 6
-SUBDIRS = tests mpn mpz mpq mpf printf scanf rand cxx demos tune doc
+SUBDIRS = tests mpn mpz mpq mpf printf scanf rand cxx demos tune
EXTRA_DIST = configfsf.guess configfsf.sub .gdbinit INSTALL.autoconf \
COPYING.LESSERv3 COPYINGv2 COPYINGv3
diff -Naur gmp-6.2.1-clean/Makefile.in gmp-6.2.1-dirty/Makefile.in
--- gmp-6.2.1-clean/Makefile.in 2020-11-14 18:45:16.000000000 +0000
+++ gmp-6.2.1-dirty/Makefile.in 2023-01-24 13:06:47.691201700 +0000
@@ -572,7 +572,7 @@
LIBGMPXX_LT_CURRENT = 10
LIBGMPXX_LT_REVISION = 1
LIBGMPXX_LT_AGE = 6
-SUBDIRS = tests mpn mpz mpq mpf printf scanf rand cxx demos tune doc
+SUBDIRS = tests mpn mpz mpq mpf printf scanf rand cxx demos tune
# Put asl.h here for now.
diff -Naur gmp-6.2.1-clean/configure gmp-6.2.1-dirty/configure
--- gmp-6.2.1-clean/configure 2020-11-14 18:45:15.000000000 +0000
+++ gmp-6.2.1-dirty/configure 2023-01-24 14:06:26.822206200 +0000
@@ -12142,8 +12142,8 @@
#
if test "$enable_shared" = yes; then
GMP_LDFLAGS="$GMP_LDFLAGS -no-undefined -Wl,--export-all-symbols"
- LIBGMP_LDFLAGS="$LIBGMP_LDFLAGS -Wl,--output-def,.libs/libgmp-3.dll.def"
- LIBGMPXX_LDFLAGS="$LIBGMP_LDFLAGS -Wl,--output-def,.libs/libgmpxx-3.dll.def"
+ #LIBGMP_LDFLAGS="$LIBGMP_LDFLAGS -Wl,--output-def,.libs/libgmp-3.dll.def"
+ #LIBGMPXX_LDFLAGS="$LIBGMP_LDFLAGS -Wl,--output-def,.libs/libgmpxx-3.dll.def"
LIBGMP_DLL=1
fi
;;
diff -Naur gmp-6.2.1-clean/gmp-h.in gmp-6.2.1-dirty/gmp-h.in
--- gmp-6.2.1-clean/gmp-h.in 2020-11-14 18:45:09.000000000 +0000
+++ gmp-6.2.1-dirty/gmp-h.in 2023-01-24 14:07:02.962184400 +0000
@@ -398,7 +398,7 @@
/* Microsoft's C compiler accepts __inline */
#ifdef _MSC_VER
-#define __GMP_EXTERN_INLINE __inline
+#define __GMP_EXTERN_INLINE static __inline
#endif
/* Recent enough Sun C compilers want "inline" */
diff -Naur gmp-6.2.1-clean/mpz/inp_raw.c gmp-6.2.1-dirty/mpz/inp_raw.c
--- gmp-6.2.1-clean/mpz/inp_raw.c 2020-11-14 18:45:09.000000000 +0000
+++ gmp-6.2.1-dirty/mpz/inp_raw.c 2023-01-24 10:24:26.379294800 +0000
--- a/mpz/inp_raw.c Tue Dec 22 23:49:51 2020 +0100
+++ b/mpz/inp_raw.c Thu Oct 21 19:06:49 2021 +0200
@@ -88,8 +88,11 @@
abs_csize = ABS (csize);
+ if (UNLIKELY (abs_csize > ~(mp_bitcnt_t) 0 / 8))
+ return 0; /* Bit size overflows */
+
/* round up to a multiple of limbs */
- abs_xsize = BITS_TO_LIMBS (abs_csize*8);
+ abs_xsize = BITS_TO_LIMBS ((mp_bitcnt_t) abs_csize * 8);
if (abs_xsize != 0)
{

View File

@@ -1,47 +0,0 @@
diff --git a/Makefile.MSVC b/Makefile.MSVC
index 6538911..530c9f9 100644
--- a/Makefile.MSVC
+++ b/Makefile.MSVC
@@ -61,6 +61,10 @@ ASM = NO # or it could be ML64 if we want to use it...
GTK = NO
! ENDIF
! ENDIF
+! IF "$(MSVCVER)" == "ARM64"
+ASM = NO
+GTK = NO
+! ENDIF
! ELSE
! IF "$(COMP)" == ""
COMP = MSVC
@@ -99,7 +103,13 @@ SNDFILE = NO
! ENDIF
OFF = win32
+! IF "$(MSVCVER)" == "Win64"
+MACHINE = /machine:x64
+! ELSEIF "$(MSVCVER)" == "ARM64"
+MACHINE = /machine:ARM64
+! ELSE
MACHINE = /machine:I386
+! ENDIF
LIB_OPTS = /nologo $(MACHINE)
! MESSAGE ----------------------------------------------------------------------
@@ -150,6 +160,8 @@ LIB_OPTS = /nologo $(MACHINE)
! ELSE
! IF "$(MSVCVER)" == "Win64"
! MESSAGE + using MS 64-Bit Compiler
+! ELSEIF "$(MSVCVER)" == "ARM64"
+! MESSAGE + using MS ARM64 Compiler
! ELSE
! MESSAGE using MS COMPILER
! IF "$(CPU)" == "P1"
@@ -209,6 +221,8 @@ CC_OPTS = /nologo /DWin64 /O2b2ity /GAy /Gs1024 /Zp8 /GL /GS- /Zi
CC_OPTS = /nologo /O2 /Wp64 /Oi /GL /arch:SSE /fp:precise
! ELSEif "$(CPU)"=="P6"
CC_OPTS = /nologo /O2 /Ob2 /GAy /Gs1024 /Zp8 /Zi
+! ELSEIF "$(MSVCVER)" == "ARM64"
+CC_OPTS = /nologo /O2 /Ob3 /GAy /Zi
!else
CC_OPTS = /nologo /O2 /Ob2 /GAy /Gs1024 /QIfdiv /QI0f /YX
! ENDIF

View File

@@ -1,63 +0,0 @@
; Based on VCPKG's implementation
EXPORTS
; Old alpha API
theora_version_string
theora_version_number
theora_decode_header
theora_decode_init
theora_decode_packetin
theora_decode_YUVout
theora_control
theora_packet_isheader
theora_packet_iskeyframe
theora_granule_shift
theora_granule_frame
theora_granule_time
theora_info_init
theora_info_clear
theora_clear
theora_comment_init
theora_comment_add
theora_comment_add_tag
theora_comment_query
theora_comment_query_count
theora_comment_clear
; New theora-exp API
th_version_string
th_version_number
th_decode_headerin
th_decode_alloc
th_setup_free
th_decode_ctl
th_decode_packetin
th_decode_ycbcr_out
th_decode_free
th_packet_isheader
th_packet_iskeyframe
th_granule_frame
th_granule_time
th_info_init
th_info_clear
th_comment_init
th_comment_add
th_comment_add_tag
th_comment_query
th_comment_query_count
th_comment_clear
; Old alpha API
theora_encode_init
theora_encode_YUVin
theora_encode_packetout
theora_encode_header
theora_encode_comment
theora_encode_tables
; New theora-exp API
th_encode_alloc
th_encode_ctl
th_encode_flushheader
th_encode_ycbcr_in
th_encode_packetout
th_encode_free
TH_VP31_QUANT_INFO
TH_VP31_HUFF_CODES

View File

@@ -1,7 +1,7 @@
@title MSYS2 64-bit MSVC build environment
@title MinGW-w64 64-bit GCC build environment
@echo Setting up environment for MSYS2 MSVC 64-bit...
@echo Setting up environment for MinGW-w64 GCC 64-bit...
@set PATH=%CD%\usr\bin;%cd%\..\..\perl\site\bin;%cd%\..\..\perl\bin;%cd%\..\..\c\bin;%PATH%
@set PATH=%CD%\bin;%CD%\msys\1.0\bin;%cd%\..\..\perl\site\bin;%cd%\..\..\perl\bin;%cd%\..\..\c\bin;%PATH%

View File

@@ -1,12 +0,0 @@
diff --git a/CMakeLists.txt b/CMakeLists.txt
index 17ee3fc2..9027d073 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -16,7 +16,6 @@ string(REGEX
message(STATUS "Opus project version: ${PROJECT_VERSION}")
project(Opus LANGUAGES C VERSION ${PROJECT_VERSION})
-include(opus_buildtype.cmake)
option(OPUS_STACK_PROTECTOR "Use stack protection" ON)
option(OPUS_USE_ALLOCA "Use alloca for stack arrays (on non-C99 compilers)" OFF)

View File

@@ -1,13 +0,0 @@
diff --git a/zconf.h.cmakein b/zconf.h.cmakein
index 247ba24..e5c16e6 100644
--- a/zconf.h.cmakein
+++ b/zconf.h.cmakein
@@ -439,7 +439,7 @@ typedef uLong FAR uLongf;
typedef unsigned long z_crc_t;
#endif
-#ifdef HAVE_UNISTD_H /* may be set to #if 1 by ./configure */
+#if defined(HAVE_UNISTD_H) && HAVE_UNISTD_H /* may be set to #if 1 by ./configure */
# define Z_HAVE_UNISTD_H
#endif

View File

@@ -152,7 +152,7 @@ if(WITH_CODEC_FFMPEG)
avcodec avdevice avformat avutil
mp3lame ogg opus swresample swscale
theora theoradec theoraenc vorbis vorbisenc
vorbisfile vpx x264)
vorbisfile vpx x264 xvidcore)
if(EXISTS ${LIBDIR}/ffmpeg/lib/libaom.a)
list(APPEND FFMPEG_FIND_COMPONENTS aom)
endif()

View File

@@ -242,7 +242,8 @@ if(WITH_CODEC_FFMPEG)
theora theoradec theoraenc
vorbis vorbisenc vorbisfile ogg
vpx
x264)
x264
xvidcore)
if((DEFINED LIBDIR) AND (EXISTS ${LIBDIR}/ffmpeg/lib/libaom.a))
list(APPEND FFMPEG_FIND_COMPONENTS aom)
endif()

View File

@@ -371,10 +371,8 @@ if(WITH_FFTW3)
set(FFTW3 ${LIBDIR}/fftw3)
if(EXISTS ${FFTW3}/lib/libfftw3-3.lib) # 3.6 libraries
set(FFTW3_LIBRARIES ${FFTW3}/lib/libfftw3-3.lib ${FFTW3}/lib/libfftw3f.lib)
elseif(EXISTS ${FFTW3}/lib/libfftw.lib)
set(FFTW3_LIBRARIES ${FFTW3}/lib/libfftw.lib) # 3.5 Libraries
else()
set(FFTW3_LIBRARIES ${FFTW3}/lib/fftw3.lib ${FFTW3}/lib/fftw3f.lib) # msys2+MSVC Libraries
set(FFTW3_LIBRARIES ${FFTW3}/lib/libfftw.lib) # 3.5 Libraries
endif()
set(FFTW3_INCLUDE_DIRS ${FFTW3}/include)
set(FFTW3_LIBPATH ${FFTW3}/lib)
@@ -812,11 +810,7 @@ if(WITH_CODEC_SNDFILE)
set(LIBSNDFILE ${LIBDIR}/sndfile)
set(LIBSNDFILE_INCLUDE_DIRS ${LIBSNDFILE}/include)
set(LIBSNDFILE_LIBPATH ${LIBSNDFILE}/lib) # TODO, deprecate
if(EXISTS ${LIBSNDFILE_LIBPATH}/sndfile.lib)
set(LIBSNDFILE_LIBRARIES ${LIBSNDFILE_LIBPATH}/sndfile.lib)
else()
set(LIBSNDFILE_LIBRARIES ${LIBSNDFILE_LIBPATH}/libsndfile-1.lib)
endif()
set(LIBSNDFILE_LIBRARIES ${LIBSNDFILE_LIBPATH}/libsndfile-1.lib)
endif()
if(WITH_CYCLES AND WITH_CYCLES_OSL)
@@ -1026,12 +1020,7 @@ endif()
if(WITH_GMP)
set(GMP_INCLUDE_DIRS ${LIBDIR}/gmp/include)
if(EXISTS ${LIBDIR}/gmp/lib/gmp.dll.lib)
set(GMP_DLL_LIB_NAME gmp.dll.lib)
else()
set(GMP_DLL_LIB_NAME libgmp-10.lib)
endif()
set(GMP_LIBRARIES ${LIBDIR}/gmp/lib/${GMP_DLL_LIB_NAME} optimized ${LIBDIR}/gmp/lib/libgmpxx.lib debug ${LIBDIR}/gmp/lib/libgmpxx_d.lib)
set(GMP_LIBRARIES ${LIBDIR}/gmp/lib/libgmp-10.lib optimized ${LIBDIR}/gmp/lib/libgmpxx.lib debug ${LIBDIR}/gmp/lib/libgmpxx_d.lib)
set(GMP_ROOT_DIR ${LIBDIR}/gmp)
set(GMP_FOUND ON)
endif()

View File

@@ -155,6 +155,7 @@ FFMPEG_TEST_VCODEC_NAME(libtheora, AV_PIX_FMT_YUV420P)
FFMPEG_TEST_VCODEC_NAME(libx264, AV_PIX_FMT_YUV420P)
FFMPEG_TEST_VCODEC_NAME(libvpx, AV_PIX_FMT_YUV420P)
FFMPEG_TEST_VCODEC_NAME(libopenjpeg, AV_PIX_FMT_YUV420P)
FFMPEG_TEST_VCODEC_NAME(libxvid, AV_PIX_FMT_YUV420P)
/* aom's AV1 encoder is "libaom-av1". FFMPEG_TEST_VCODEC_NAME(libaom-av1, ...)
* will not work because the dash will not work with the test macro. */
TEST(ffmpeg, libaom_av1_AV_PIX_FMT_YUV420P)

View File

@@ -1,5 +1,6 @@
# SPDX-FileCopyrightText: 2006 Blender Foundation
#
# SPDX-License-Identifier: GPL-2.0-or-later
# Copyright 2006 Blender Foundation
set(INC
../../intern/clog
@@ -887,24 +888,13 @@ elseif(WIN32)
)
endif()
if(EXISTS ${LIBDIR}/fftw3/lib/fftw3.dll)
set(FFTW_DLL ${LIBDIR}/fftw3/lib/fftw3.dll)
else()
set(FFTW_DLL ${LIBDIR}/fftw3/lib/libfftw3-3.dll)
endif()
windows_install_shared_manifest(
FILES ${FFTW_DLL}
FILES ${LIBDIR}/fftw3/lib/libfftw3-3.dll
ALL
)
if(EXISTS ${LIBDIR}/fftw3/lib/fftw3f-3.dll)
if(EXISTS ${LIBDIR}/fftw3/lib/libfftw3f-3.dll)
windows_install_shared_manifest(
FILES ${LIBDIR}/fftw3/lib/fftw3f-3.dll
ALL
)
elseif(EXISTS ${LIBDIR}/fftw3/lib/fftw3f.dll)
windows_install_shared_manifest(
FILES ${LIBDIR}/fftw3/lib/fftw3f.dll
FILES ${LIBDIR}/fftw3/lib/libfftw3f-3.dll
ALL
)
endif()
@@ -967,19 +957,10 @@ elseif(WIN32)
DEBUG
)
endif()
if(EXISTS ${LIBDIR}/gmp/lib/gmp-10.dll)
set(GMP_DLL ${LIBDIR}/gmp/lib/gmp-10.dll)
else()
set(GMP_DLL ${LIBDIR}/gmp/lib/libgmp-10.dll)
endif()
windows_install_shared_manifest(
FILES ${GMP_DLL}
FILES ${LIBDIR}/gmp/lib/libgmp-10.dll
ALL
)
unset(GMP_DLL)
windows_install_shared_manifest(
FILES ${LIBDIR}/gmp/lib/libgmpxx.dll
RELEASE
@@ -1287,17 +1268,10 @@ elseif(WIN32)
list(APPEND LIB ${TBB_MALLOC_LIBRARIES})
endif()
if(EXISTS ${LIBDIR}/sndfile/lib/sndfile.dll)
set(SNDFILE_DLL ${LIBDIR}/sndfile/lib/sndfile.dll)
else()
set(SNDFILE_DLL ${LIBDIR}/sndfile/lib/libsndfile-1.dll)
endif()
windows_install_shared_manifest(
FILES ${SNDFILE_DLL}
FILES ${LIBDIR}/sndfile/lib/libsndfile-1.dll
ALL
)
unset(SNDFILE_DLL)
windows_install_shared_manifest(
FILES ${LIBDIR}/shaderc/bin/shaderc_shared.dll