aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMatthias C. M. Troffaes <matthias.troffaes@gmail.com>2020-10-28 21:24:51 +0000
committerGitHub <noreply@github.com>2020-10-28 14:24:51 -0700
commit0ff714bd520f5315081db50acce43644832451ba (patch)
tree228153109e23b1e0d3e9f979f6d9166b6256c23c
parent2a2070c4b196b8ecd9e553198523edd0ec71ced0 (diff)
downloadvcpkg-0ff714bd520f5315081db50acce43644832451ba.tar.gz
vcpkg-0ff714bd520f5315081db50acce43644832451ba.zip
[ffmpeg] link against dl on unix when nvcodec feature is enabled (#14219)
-rw-r--r--ports/ffmpeg/CONTROL2
-rw-r--r--ports/ffmpeg/FindFFMPEG.cmake.in6
-rw-r--r--ports/ffmpeg/portfile.cmake2
3 files changed, 9 insertions, 1 deletions
diff --git a/ports/ffmpeg/CONTROL b/ports/ffmpeg/CONTROL
index 5cdcb190c..01c42182b 100644
--- a/ports/ffmpeg/CONTROL
+++ b/ports/ffmpeg/CONTROL
@@ -1,6 +1,6 @@
Source: ffmpeg
Version: 4.3.1
-Port-Version: 2
+Port-Version: 3
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.
diff --git a/ports/ffmpeg/FindFFMPEG.cmake.in b/ports/ffmpeg/FindFFMPEG.cmake.in
index a96c04235..6e667ab9c 100644
--- a/ports/ffmpeg/FindFFMPEG.cmake.in
+++ b/ports/ffmpeg/FindFFMPEG.cmake.in
@@ -97,6 +97,12 @@ if(@ENABLE_LAME@)
list(APPEND FFMPEG_PLATFORM_DEPENDENT_LIBS ${mp3lame_LIBRARIES})
endif()
+if(@ENABLE_NVCODEC@)
+ if(UNIX)
+ list(APPEND FFMPEG_PLATFORM_DEPENDENT_LIBS dl)
+ endif()
+endif()
+
if(@ENABLE_OPENCL@)
find_dependency(OpenCL)
list(APPEND FFMPEG_PLATFORM_DEPENDENT_LIBS ${OpenCL_LIBRARIES})
diff --git a/ports/ffmpeg/portfile.cmake b/ports/ffmpeg/portfile.cmake
index f41dbd38d..cbe8df318 100644
--- a/ports/ffmpeg/portfile.cmake
+++ b/ports/ffmpeg/portfile.cmake
@@ -214,8 +214,10 @@ else()
set(OPTIONS "${OPTIONS} --disable-libmp3lame")
endif()
+set(ENABLE_NVCODEC OFF)
if("nvcodec" IN_LIST FEATURES)
#Note: the --enable-cuda option does not actually require the cuda sdk or toolset port dependency as ffmpeg uses runtime detection and dynamic loading
+ set(ENABLE_NVCODEC ON)
set(OPTIONS "${OPTIONS} --enable-cuda --enable-nvenc --enable-nvdec --enable-cuvid")
else()
set(OPTIONS "${OPTIONS} --disable-cuda --disable-nvenc --disable-nvdec --disable-cuvid")