aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRobert Schumacher <roschuma@microsoft.com>2018-02-21 16:39:48 -0800
committerRobert Schumacher <roschuma@microsoft.com>2018-02-23 17:06:37 -0800
commit175d25ae4704de187930010481ff2f9cdb5af1a4 (patch)
treeb5db63efea88415bb4c086e826a0e996b481e297
parentbd52db332b3ba8cba20e6a7a92205e480b504935 (diff)
downloadvcpkg-175d25ae4704de187930010481ff2f9cdb5af1a4.tar.gz
vcpkg-175d25ae4704de187930010481ff2f9cdb5af1a4.zip
[ffmpeg] Deploy FindFFMPEG cmake file
-rw-r--r--ports/ffmpeg/CONTROL2
-rw-r--r--ports/ffmpeg/FindFFMPEG.cmake11
-rw-r--r--ports/ffmpeg/portfile.cmake3
3 files changed, 15 insertions, 1 deletions
diff --git a/ports/ffmpeg/CONTROL b/ports/ffmpeg/CONTROL
index a2111c03a..3ed4c4bac 100644
--- a/ports/ffmpeg/CONTROL
+++ b/ports/ffmpeg/CONTROL
@@ -1,5 +1,5 @@
Source: ffmpeg
-Version: 3.3.3-2
+Version: 3.3.3-3
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 b/ports/ffmpeg/FindFFMPEG.cmake
new file mode 100644
index 000000000..ce6e7e600
--- /dev/null
+++ b/ports/ffmpeg/FindFFMPEG.cmake
@@ -0,0 +1,11 @@
+include(FindPackageHandleStandardArgs)
+
+find_path(FFMPEG_INCLUDE_DIRS NAMES libavcodec/avcodec.h)
+unset(FFMPEG_LIBRARIES)
+foreach(FFMPEG_SUBLIBRARY avformat avdevice avcodec avutil swscale)
+ find_library(FFMPEG_lib${FFMPEG_SUBLIBRARY}_LIBRARY NAMES ${FFMPEG_SUBLIBRARY})
+ list(APPEND FFMPEG_LIBRARIES ${FFMPEG_lib${FFMPEG_SUBLIBRARY}_LIBRARY})
+endforeach()
+list(APPEND FFMPEG_LIBRARIES wsock32 ws2_32 Secur32)
+
+find_package_handle_standard_args(FFMPEG REQUIRED_VARS FFMPEG_LIBRARIES FFMPEG_INCLUDE_DIR)
diff --git a/ports/ffmpeg/portfile.cmake b/ports/ffmpeg/portfile.cmake
index 4a0d052a3..9e969bf6c 100644
--- a/ports/ffmpeg/portfile.cmake
+++ b/ports/ffmpeg/portfile.cmake
@@ -146,3 +146,6 @@ vcpkg_copy_pdbs()
# TODO: Examine build log and confirm that this license matches the build output
file(COPY ${SOURCE_PATH}/COPYING.LGPLv2.1 DESTINATION ${CURRENT_PACKAGES_DIR}/share/ffmpeg)
file(RENAME ${CURRENT_PACKAGES_DIR}/share/ffmpeg/COPYING.LGPLv2.1 ${CURRENT_PACKAGES_DIR}/share/ffmpeg/copyright)
+
+# Used by OpenCV
+file(COPY ${CMAKE_CURRENT_LIST_DIR}/FindFFMPEG.cmake DESTINATION ${CURRENT_PACKAGES_DIR}/share/ffmpeg)