aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--ports/ffmpeg/0001-create-lib-libraries.patch (renamed from ports/ffmpeg/create-lib-libraries.patch)17
-rw-r--r--ports/ffmpeg/0002-detect-openssl.patch (renamed from ports/ffmpeg/detect-openssl.patch)18
-rw-r--r--ports/ffmpeg/0003-fix-windowsinclude.patch28
-rw-r--r--ports/ffmpeg/0004-fix-debug-build.patch (renamed from ports/ffmpeg/fix-debug-build.patch)6
-rw-r--r--ports/ffmpeg/0005-fix-libvpx-linking.patch (renamed from ports/ffmpeg/fix_libvpx_windows_linking.patch)32
-rw-r--r--ports/ffmpeg/CONTROL5
-rw-r--r--ports/ffmpeg/FindFFMPEG.cmake.in (renamed from ports/ffmpeg/FindFFMPEG.cmake)36
-rw-r--r--ports/ffmpeg/fix_windowsinclude-in-ffmpegexe-1.patch11
-rw-r--r--ports/ffmpeg/fix_windowsinclude-in-ffmpegexe-2.patch14
-rw-r--r--ports/ffmpeg/portfile.cmake42
10 files changed, 100 insertions, 109 deletions
diff --git a/ports/ffmpeg/create-lib-libraries.patch b/ports/ffmpeg/0001-create-lib-libraries.patch
index ccad5ff8c..493e24c1b 100644
--- a/ports/ffmpeg/create-lib-libraries.patch
+++ b/ports/ffmpeg/0001-create-lib-libraries.patch
@@ -1,18 +1,8 @@
-From 5f7c72d6c93fb1f4a730e2315fff6e5eb9bb95c8 Mon Sep 17 00:00:00 2001
-From: Anonymous Maarten <anonymous.maarten@gmail.com>
-Date: Wed, 27 Sep 2017 15:50:40 +0200
-Subject: [PATCH] configure: create .lib static libraries using MSVC compiler
- (instead of .a)
-
----
- configure | 2 ++
- 1 file changed, 2 insertions(+)
-
diff --git a/configure b/configure
-index ba38a73906..0a3f308323 100755
+index 34c2adb..1c8008a 100755
--- a/configure
+++ b/configure
-@@ -4890,15 +4890,17 @@
+@@ -5352,15 +5352,17 @@ case $target_os in
;;
win32|win64)
disable symver
@@ -33,6 +23,3 @@ index ba38a73906..0a3f308323 100755
SLIBPREF=""
SLIBSUF=".dll"
SLIBNAME_WITH_VERSION='$(SLIBPREF)$(FULLNAME)-$(LIBVERSION)$(SLIBSUF)'
---
-2.14.1.windows.1
-
diff --git a/ports/ffmpeg/detect-openssl.patch b/ports/ffmpeg/0002-detect-openssl.patch
index affd37d15..87a7656c8 100644
--- a/ports/ffmpeg/detect-openssl.patch
+++ b/ports/ffmpeg/0002-detect-openssl.patch
@@ -1,22 +1,14 @@
-From 18de5c60ae0a987680681d5a0602009b428504fa Mon Sep 17 00:00:00 2001
-From: Gilles Khouzam <gillesk@microsoft.com>
-Date: Mon, 19 Jun 2017 16:33:38 -0700
-Subject: [PATCH] Add better detection for Openssl on Windows.
-
-Look for libeay32 and ssleay32 as another detection mechanism
----
- configure | 1 +
- 1 file changed, 1 insertion(+)
-
diff --git a/configure b/configure
-index a1818dc..1cf2a7c 100755
+index 1c8008a..bd2de34 100755
--- a/configure
+++ b/configure
-@@ -6127,6 +6127,7 @@
+@@ -6360,7 +6360,8 @@ enabled openssl && { check_pkg_config openssl openssl openssl/ssl.h OP
check_lib openssl openssl/ssl.h SSL_library_init -lssl -lcrypto ||
check_lib openssl openssl/ssl.h SSL_library_init -lssl32 -leay32 ||
check_lib openssl openssl/ssl.h SSL_library_init -lssl -lcrypto -lws2_32 -lgdi32 ||
+- die "ERROR: openssl not found"; }
+ check_lib openssl openssl/ssl.h SSL_library_init -llibeay32 -lssleay32 ||
- die "ERROR: openssl not found"; }
++ die "ERROR: openssl not found"; }
+ enabled pocketsphinx && require_pkg_config pocketsphinx pocketsphinx pocketsphinx/pocketsphinx.h ps_init
enabled rkmpp && { require_pkg_config rkmpp rockchip_mpp rockchip/rk_mpi.h mpp_create &&
require_pkg_config rockchip_mpp "rockchip_mpp >= 1.3.7" rockchip/rk_mpi.h mpp_create &&
diff --git a/ports/ffmpeg/0003-fix-windowsinclude.patch b/ports/ffmpeg/0003-fix-windowsinclude.patch
new file mode 100644
index 000000000..8fe6a5474
--- /dev/null
+++ b/ports/ffmpeg/0003-fix-windowsinclude.patch
@@ -0,0 +1,28 @@
+diff --git a/fftools/cmdutils.c b/fftools/cmdutils.c
+index 9cfbc45..e3447e6 100644
+--- a/fftools/cmdutils.c
++++ b/fftools/cmdutils.c
+@@ -63,6 +63,8 @@
+ #include <sys/resource.h>
+ #endif
+ #ifdef _WIN32
++#define _WIN32_WINNT 0x0502
++#define WIN32_LEAN_AND_MEAN
+ #include <windows.h>
+ #endif
+
+diff --git a/fftools/ffmpeg.c b/fftools/ffmpeg.c
+index 01f0410..dbb0736 100644
+--- a/fftools/ffmpeg.c
++++ b/fftools/ffmpeg.c
+@@ -23,6 +23,10 @@
+ * multimedia converter based on the FFmpeg libraries
+ */
+
++#define _WIN32_WINNT 0x0502 // Must be less than 0x0600, because otherwise WinSock2.h defines "pollfd" which then gets redefined in "os_support.h".
++#define WIN32_LEAN_AND_MEAN
++
++
+ #include "config.h"
+ #include <ctype.h>
+ #include <string.h>
diff --git a/ports/ffmpeg/fix-debug-build.patch b/ports/ffmpeg/0004-fix-debug-build.patch
index 324eb79f9..6fe0780db 100644
--- a/ports/ffmpeg/fix-debug-build.patch
+++ b/ports/ffmpeg/0004-fix-debug-build.patch
@@ -1,8 +1,8 @@
diff --git a/configure b/configure
-index 7c5b8a1..181fc47 100644
+index bd2de34..fba948a 100755
--- a/configure
+++ b/configure
-@@ -3906,6 +3906,9 @@ for opt do
+@@ -3993,6 +3993,9 @@ for opt do
--libfuzzer=*)
libfuzzer_path="$optval"
;;
@@ -12,7 +12,7 @@ index 7c5b8a1..181fc47 100644
*)
optname="${opt%%=*}"
optname="${optname#--}"
-@@ -6037,8 +6040,13 @@ fi
+@@ -6152,8 +6155,13 @@ fi
enabled zlib && { check_pkg_config zlib zlib "zlib.h" zlibVersion ||
check_lib zlib zlib.h zlibVersion -lz; }
diff --git a/ports/ffmpeg/fix_libvpx_windows_linking.patch b/ports/ffmpeg/0005-fix-libvpx-linking.patch
index 805cd7e78..dac5e5928 100644
--- a/ports/ffmpeg/fix_libvpx_windows_linking.patch
+++ b/ports/ffmpeg/0005-fix-libvpx-linking.patch
@@ -1,8 +1,8 @@
-diff --git "a/configure" "b/configure"
-index c8be177..2fef830 100644
---- "a/configure"
-+++ "b/configure"
-@@ -5098,6 +5098,8 @@ case "$arch" in
+diff --git a/configure b/configure
+index fba948a..50eea9b 100755
+--- a/configure
++++ b/configure
+@@ -5207,6 +5207,8 @@ case "$arch" in
;;
esac
@@ -11,7 +11,7 @@ index c8be177..2fef830 100644
# OS specific
case $target_os in
aix)
-@@ -5269,6 +5271,15 @@ case $target_os in
+@@ -5379,6 +5381,15 @@ case $target_os in
enabled x86_64 && objformat="win64" || objformat="win32"
ranlib=:
enable dos_paths
@@ -27,29 +27,27 @@ index c8be177..2fef830 100644
;;
cygwin*)
target_os=cygwin
-@@ -6153,21 +6164,21 @@ enabled libvorbis && require_pkg_config libvorbis vorbis vorbis/codec.h
+@@ -6290,19 +6301,19 @@ enabled libvorbis && require_pkg_config libvorbis vorbis vorbis/codec.h
enabled libvpx && {
enabled libvpx_vp8_decoder && {
check_pkg_config libvpx_vp8_decoder "vpx >= 1.4.0" "vpx/vpx_decoder.h vpx/vp8dx.h" vpx_codec_vp8_dx ||
-- check_lib libvpx_vp8_decoder "vpx/vpx_decoder.h vpx/vp8dx.h" "vpx_codec_dec_init_ver VPX_IMG_FMT_HIGHBITDEPTH" -lvpx ||
-+ check_lib libvpx_vp8_decoder "vpx/vpx_decoder.h vpx/vp8dx.h" "vpx_codec_dec_init_ver VPX_IMG_FMT_HIGHBITDEPTH" -l$libvpx_name ||
- die "ERROR: libvpx decoder version must be >=1.4.0";
+- check_lib libvpx_vp8_decoder "vpx/vpx_decoder.h vpx/vp8dx.h" "vpx_codec_vp8_dx VPX_IMG_FMT_HIGHBITDEPTH" "-lvpx $libm_extralibs $pthreads_extralibs"
++ check_lib libvpx_vp8_decoder "vpx/vpx_decoder.h vpx/vp8dx.h" "vpx_codec_vp8_dx VPX_IMG_FMT_HIGHBITDEPTH" "-l$libvpx_name $libm_extralibs $pthreads_extralibs"
}
enabled libvpx_vp8_encoder && {
check_pkg_config libvpx_vp8_encoder "vpx >= 1.4.0" "vpx/vpx_encoder.h vpx/vp8cx.h" vpx_codec_vp8_cx ||
-- check_lib libvpx_vp8_encoder "vpx/vpx_encoder.h vpx/vp8cx.h" "vpx_codec_enc_init_ver VPX_IMG_FMT_HIGHBITDEPTH" -lvpx ||
-+ check_lib libvpx_vp8_encoder "vpx/vpx_encoder.h vpx/vp8cx.h" "vpx_codec_enc_init_ver VPX_IMG_FMT_HIGHBITDEPTH" -l$libvpx_name ||
- die "ERROR: libvpx encoder version must be >=1.4.0";
+- check_lib libvpx_vp8_encoder "vpx/vpx_encoder.h vpx/vp8cx.h" "vpx_codec_vp8_cx VPX_IMG_FMT_HIGHBITDEPTH" "-lvpx $libm_extralibs $pthreads_extralibs"
++ check_lib libvpx_vp8_encoder "vpx/vpx_encoder.h vpx/vp8cx.h" "vpx_codec_vp8_cx VPX_IMG_FMT_HIGHBITDEPTH" "-l$libvpx_name $libm_extralibs $pthreads_extralibs"
}
enabled libvpx_vp9_decoder && {
check_pkg_config libvpx_vp9_decoder "vpx >= 1.4.0" "vpx/vpx_decoder.h vpx/vp8dx.h" vpx_codec_vp9_dx ||
-- check_lib libvpx_vp9_decoder "vpx/vpx_decoder.h vpx/vp8dx.h" "vpx_codec_vp9_dx VPX_IMG_FMT_HIGHBITDEPTH" "-lvpx $libm_extralibs"
-+ check_lib libvpx_vp9_decoder "vpx/vpx_decoder.h vpx/vp8dx.h" "vpx_codec_vp9_dx VPX_IMG_FMT_HIGHBITDEPTH" "-l$libvpx_name $libm_extralibs"
+- check_lib libvpx_vp9_decoder "vpx/vpx_decoder.h vpx/vp8dx.h" "vpx_codec_vp9_dx VPX_IMG_FMT_HIGHBITDEPTH" "-lvpx $libm_extralibs $pthreads_extralibs"
++ check_lib libvpx_vp9_decoder "vpx/vpx_decoder.h vpx/vp8dx.h" "vpx_codec_vp9_dx VPX_IMG_FMT_HIGHBITDEPTH" "-l$libvpx_name $libm_extralibs $pthreads_extralibs"
}
enabled libvpx_vp9_encoder && {
check_pkg_config libvpx_vp9_encoder "vpx >= 1.4.0" "vpx/vpx_encoder.h vpx/vp8cx.h" vpx_codec_vp9_cx ||
-- check_lib libvpx_vp9_encoder "vpx/vpx_encoder.h vpx/vp8cx.h" "vpx_codec_vp9_cx VPX_IMG_FMT_HIGHBITDEPTH" "-lvpx $libm_extralibs"
-+ check_lib libvpx_vp9_encoder "vpx/vpx_encoder.h vpx/vp8cx.h" "vpx_codec_vp9_cx VPX_IMG_FMT_HIGHBITDEPTH" "-l$libvpx_name $libm_extralibs"
+- check_lib libvpx_vp9_encoder "vpx/vpx_encoder.h vpx/vp8cx.h" "vpx_codec_vp9_cx VPX_IMG_FMT_HIGHBITDEPTH" "-lvpx $libm_extralibs $pthreads_extralibs"
++ check_lib libvpx_vp9_encoder "vpx/vpx_encoder.h vpx/vp8cx.h" "vpx_codec_vp9_cx VPX_IMG_FMT_HIGHBITDEPTH" "-l$libvpx_name $libm_extralibs $pthreads_extralibs"
}
if disabled_all libvpx_vp8_decoder libvpx_vp9_decoder libvpx_vp8_encoder libvpx_vp9_encoder; then
die "libvpx enabled but no supported decoders found"
diff --git a/ports/ffmpeg/CONTROL b/ports/ffmpeg/CONTROL
index 724a849c2..578a8a91a 100644
--- a/ports/ffmpeg/CONTROL
+++ b/ports/ffmpeg/CONTROL
@@ -1,13 +1,14 @@
Source: ffmpeg
-Version: 4.1-11
+Version: 4.2
Build-Depends: zlib
Homepage: https://ffmpeg.org
Description: a library to decode, encode, transcode, mux, demux, stream, filter and play pretty much anything that humans and machines have created.
FFmpeg is the leading multimedia framework, able to decode, encode, transcode, mux, demux, stream, filter and play pretty much anything that humans and machines have created. It supports the most obscure ancient formats up to the cutting edge. No matter if they were designed by some standards committee, the community or a corporation. It is also highly portable: FFmpeg compiles, runs, and passes our testing infrastructure FATE across Linux, Mac OS X, Microsoft Windows, the BSDs, Solaris, etc. under a wide variety of build environments, machine architectures, and configurations.
+Default-Features: avresample
Feature: ffmpeg
Description: build the ffmpeg.exe application
-
+
Feature: ffserver
Description: ffserver appplication support in ffmpeg
diff --git a/ports/ffmpeg/FindFFMPEG.cmake b/ports/ffmpeg/FindFFMPEG.cmake.in
index 4ed03f457..d5139220b 100644
--- a/ports/ffmpeg/FindFFMPEG.cmake
+++ b/ports/ffmpeg/FindFFMPEG.cmake.in
@@ -23,24 +23,29 @@
# ``FFMPEG_LIBRARIES``
# List of the FFMPEG libraries found
#
-# Hints
-# ^^^^^
-#
-# ``FFMPEG_ROOT``
-# Set this variable to a directory that contains a FFMPEG installation
-#
#
include(${CMAKE_ROOT}/Modules/FindPackageHandleStandardArgs.cmake)
include(${CMAKE_ROOT}/Modules/SelectLibraryConfigurations.cmake)
include(${CMAKE_ROOT}/Modules/CMakeFindDependencyMacro.cmake)
-set(FFMPEG_VERSION "4.1")
+set(FFMPEG_VERSION "4.2")
find_dependency(Threads)
-#list(APPEND FFMPEG_PLATFORM_DEPENDENT_LIBS Threads::Threads)
if(UNIX)
- list(APPEND FFMPEG_PLATFORM_DEPENDENT_LIBS -pthread)
+ list(APPEND FFMPEG_PLATFORM_DEPENDENT_LIBS -pthread -lvdpau -lX11)
+endif()
+
+if(@ENABLE_BZIP2@)
+ find_dependency(BZip2)
+ get_target_property(BZip2_LIBRARY_RELEASE BZip2::BZip2 IMPORTED_LOCATION_RELEASE)
+ get_target_property(BZip2_LIBRARY_DEBUG BZip2::BZip2 IMPORTED_LOCATION_DEBUG)
+ list(APPEND FFMPEG_PLATFORM_DEPENDENT_LIBS "$<$<CONFIG:Debug>:${BZip2_LIBRARY_DEBUG}>$<$<CONFIG:Release>:${BZip2_LIBRARY_RELEASE}>")
+endif()
+
+if(@ENABLE_LZMA@)
+ find_dependency(LibLZMA)
+ list(APPEND FFMPEG_PLATFORM_DEPENDENT_LIBS "$<$<CONFIG:Debug>:${LibLZMA_LIBRARY_DEBUG}>$<$<CONFIG:Release>:${LibLZMA_LIBRARY_RELEASE}>")
endif()
# Platform dependent libraries required by FFMPEG
@@ -126,6 +131,7 @@ FFMPEG_FIND(libavcodec avcodec avcodec.h)
FFMPEG_FIND(libavdevice avdevice avdevice.h)
FFMPEG_FIND(libavfilter avfilter avfilter.h)
FFMPEG_FIND(libavformat avformat avformat.h)
+FFMPEG_FIND(libavresample avresample avresample.h)
FFMPEG_FIND(libavutil avutil avutil.h)
FFMPEG_FIND(libswresample swresample swresample.h)
FFMPEG_FIND(libswscale swscale swscale.h)
@@ -135,13 +141,16 @@ if (FFMPEG_libavcodec_FOUND AND FFMPEG_libavdevice_FOUND AND FFMPEG_libavfilter_
list(REMOVE_DUPLICATES FFMPEG_INCLUDE_DIRS)
list(REMOVE_DUPLICATES FFMPEG_LIBRARY_DIRS)
- set(FFMPEG_libavformat_VERSION "${FFMPEG_VERSION}" CACHE STRING "")
- set(FFMPEG_libavdevice_VERSION "${FFMPEG_VERSION}" CACHE STRING "")
set(FFMPEG_libavcodec_VERSION "${FFMPEG_VERSION}" CACHE STRING "")
- set(FFMPEG_libavutil_VERSION "${FFMPEG_VERSION}" CACHE STRING "")
- set(FFMPEG_libswscale_VERSION "${FFMPEG_VERSION}" CACHE STRING "")
+ set(FFMPEG_libavdevice_VERSION "${FFMPEG_VERSION}" CACHE STRING "")
set(FFMPEG_libavfilter_VERSION "${FFMPEG_VERSION}" CACHE STRING "")
+ set(FFMPEG_libavformat_VERSION "${FFMPEG_VERSION}" CACHE STRING "")
+ if(FFMPEG_libavresample_FOUND)
+ set(FFMPEG_libavresample_VERSION "${FFMPEG_VERSION}" CACHE STRING "")
+ endif()
+ set(FFMPEG_libavutil_VERSION "${FFMPEG_VERSION}" CACHE STRING "")
set(FFMPEG_libswresample_VERSION "${FFMPEG_VERSION}" CACHE STRING "")
+ set(FFMPEG_libswscale_VERSION "${FFMPEG_VERSION}" CACHE STRING "")
list(APPEND FFMPEG_LIBRARIES
${FFMPEG_libavformat_LIBRARY}
@@ -151,6 +160,7 @@ if (FFMPEG_libavcodec_FOUND AND FFMPEG_libavdevice_FOUND AND FFMPEG_libavfilter_
${FFMPEG_libswscale_LIBRARY}
${FFMPEG_libavfilter_LIBRARY}
${FFMPEG_libswresample_LIBRARY}
+ ${FFMPEG_libavresample_LIBRARY}
${FFMPEG_libzlib_LIBRARY}
${FFMPEG_PLATFORM_DEPENDENT_LIBS}
)
diff --git a/ports/ffmpeg/fix_windowsinclude-in-ffmpegexe-1.patch b/ports/ffmpeg/fix_windowsinclude-in-ffmpegexe-1.patch
deleted file mode 100644
index 09ee1219f..000000000
--- a/ports/ffmpeg/fix_windowsinclude-in-ffmpegexe-1.patch
+++ /dev/null
@@ -1,11 +0,0 @@
---- a/fftools/cmdutils.c 2017-07-29 19:49:29.000000000 +0200
-+++ b/fftools/cmdutils.c 2018-09-02 20:31:42.509408400 +0200
-@@ -62,6 +62,8 @@
- #include <sys/resource.h>
- #endif
- #ifdef _WIN32
-+#define _WIN32_WINNT 0x0600
-+#define WIN32_LEAN_AND_MEAN
- #include <windows.h>
- #endif
-
diff --git a/ports/ffmpeg/fix_windowsinclude-in-ffmpegexe-2.patch b/ports/ffmpeg/fix_windowsinclude-in-ffmpegexe-2.patch
deleted file mode 100644
index 69d725e2a..000000000
--- a/ports/ffmpeg/fix_windowsinclude-in-ffmpegexe-2.patch
+++ /dev/null
@@ -1,14 +0,0 @@
---- a/fftools/ffmpeg.c 2017-07-29 19:49:29.000000000 +0200
-+++ b/fftools/ffmpeg.c 2018-09-02 20:32:27.666725200 +0200
-@@ -23,6 +23,11 @@
- * multimedia converter based on the FFmpeg libraries
- */
-
-+#define _WIN32_WINNT 0x0502 // Must be less than 0x0600, because otherwise WinSock2.h defines "pollfd" which then gets redefined in "os_support.h".
-+ // I suppose that "HAVE_STRUCT_POLLFD" should be 1, but it happens to be 0. Sorry, this is somewhat beyond me.
-+#define WIN32_LEAN_AND_MEAN
-+
-+
- #include "config.h"
- #include <ctype.h>
- #include <string.h>
diff --git a/ports/ffmpeg/portfile.cmake b/ports/ffmpeg/portfile.cmake
index 079880ab3..394eb9cbc 100644
--- a/ports/ffmpeg/portfile.cmake
+++ b/ports/ffmpeg/portfile.cmake
@@ -1,21 +1,17 @@
include(vcpkg_common_functions)
-vcpkg_download_distfile(ARCHIVE
- URLS "http://ffmpeg.org/releases/ffmpeg-4.1.tar.bz2"
- FILENAME "ffmpeg-4.1.tar.bz2"
- SHA512 ccf6d07268dc47e08ca619eb182a003face2a8ee73ec1a28157330dd7de1df88939def1fc1c7e6b6ac7b59752cdad84657d589b2fafb73e14e5ef03fb6e33417
-)
-
-vcpkg_extract_source_archive_ex(
+vcpkg_from_github(
OUT_SOURCE_PATH SOURCE_PATH
- ARCHIVE ${ARCHIVE}
+ REPO ffmpeg/ffmpeg
+ REF n4.2
+ SHA512 9fa56364696f91e2bf4287954d26f0c35b3f8aad241df3fbd3c9fc617235d8c83b28ddcac88436383b2eb273f690322e6f349e2f9c64d02f0058a4b76fa55035
+ HEAD_REF master
PATCHES
- create-lib-libraries.patch
- detect-openssl.patch
- fix_windowsinclude-in-ffmpegexe-1.patch
- fix_windowsinclude-in-ffmpegexe-2.patch
- fix_libvpx_windows_linking.patch
- fix-debug-build.patch
+ 0001-create-lib-libraries.patch
+ 0002-detect-openssl.patch
+ 0003-fix-windowsinclude.patch
+ 0004-fix-debug-build.patch
+ 0005-fix-libvpx-linking.patch
)
if (${SOURCE_PATH} MATCHES " ")
@@ -113,14 +109,18 @@ else()
set(OPTIONS "${OPTIONS} --disable-opencl")
endif()
+set (ENABLE_LZMA OFF)
if("lzma" IN_LIST FEATURES)
set(OPTIONS "${OPTIONS} --enable-lzma")
+ set (ENABLE_LZMA ON) #necessary for configuring FFMPEG CMake Module
else()
set(OPTIONS "${OPTIONS} --disable-lzma")
endif()
+set (ENABLE_BZIP2 OFF)
if("bzip2" IN_LIST FEATURES)
set(OPTIONS "${OPTIONS} --enable-bzlib")
+ set (ENABLE_BZIP2 ON) #necessary for configuring FFMPEG CMake Module
else()
set(OPTIONS "${OPTIONS} --disable-bzlib")
endif()
@@ -151,11 +151,10 @@ if(VCPKG_CMAKE_SYSTEM_NAME STREQUAL "WindowsStore")
set(OPTIONS_CROSS " --enable-cross-compile --target-os=win32 --arch=${VCPKG_TARGET_ARCHITECTURE}")
endif()
-set(OPTIONS_DEBUG "") # Note: --disable-optimizations can't be used due to http://ffmpeg.org/pipermail/libav-user/2013-March/003945.html
+set(OPTIONS_DEBUG "--debug") # Note: --disable-optimizations can't be used due to http://ffmpeg.org/pipermail/libav-user/2013-March/003945.html
set(OPTIONS_RELEASE "")
set(OPTIONS "${OPTIONS} ${OPTIONS_CROSS}")
-set(OPTIONS "${OPTIONS} --extra-cflags=-DHAVE_UNISTD_H=0")
if(VCPKG_LIBRARY_LINKAGE STREQUAL "dynamic")
set(OPTIONS "${OPTIONS} --disable-static --enable-shared")
@@ -164,20 +163,21 @@ if(VCPKG_LIBRARY_LINKAGE STREQUAL "dynamic")
endif()
endif()
-message(STATUS "Building Options: ${OPTIONS}")
-
if(VCPKG_TARGET_IS_WINDOWS)
+ set(OPTIONS "${OPTIONS} --extra-cflags=-DHAVE_UNISTD_H=0")
if(VCPKG_CRT_LINKAGE STREQUAL "dynamic")
- set(OPTIONS_DEBUG "${OPTIONS_DEBUG} --extra-cflags=-MDd --extra-cxxflags=-MDd --debug")
+ set(OPTIONS_DEBUG "${OPTIONS_DEBUG} --extra-cflags=-MDd --extra-cxxflags=-MDd")
set(OPTIONS_RELEASE "${OPTIONS_RELEASE} --extra-cflags=-MD --extra-cxxflags=-MD")
else()
- set(OPTIONS_DEBUG "${OPTIONS_DEBUG} --extra-cflags=-MTd --extra-cxxflags=-MTd --debug")
+ set(OPTIONS_DEBUG "${OPTIONS_DEBUG} --extra-cflags=-MTd --extra-cxxflags=-MTd")
set(OPTIONS_RELEASE "${OPTIONS_RELEASE} --extra-cflags=-MT --extra-cxxflags=-MT")
endif()
endif()
set(ENV_LIB_PATH "$ENV{${LIB_PATH_VAR}}")
+message(STATUS "Building Options: ${OPTIONS}")
+
# Relase build
if (NOT VCPKG_BUILD_TYPE OR VCPKG_BUILD_TYPE STREQUAL release)
message(STATUS "Building Relase Options: ${OPTIONS_RELEASE}")
@@ -256,5 +256,5 @@ vcpkg_copy_pdbs()
# TODO: Examine build log and confirm that this license matches the build output
file(INSTALL ${SOURCE_PATH}/COPYING.LGPLv2.1 DESTINATION ${CURRENT_PACKAGES_DIR}/share/${PORT} RENAME copyright)
-file(COPY ${CMAKE_CURRENT_LIST_DIR}/FindFFMPEG.cmake DESTINATION ${CURRENT_PACKAGES_DIR}/share/${PORT})
+configure_file(${CMAKE_CURRENT_LIST_DIR}/FindFFMPEG.cmake.in ${CURRENT_PACKAGES_DIR}/share/${PORT}/FindFFMPEG.cmake @ONLY)
file(COPY ${CMAKE_CURRENT_LIST_DIR}/vcpkg-cmake-wrapper.cmake DESTINATION ${CURRENT_PACKAGES_DIR}/share/${PORT})