[ffmpeg] switch to vcpkg_extract_source_archive_ex

This commit is contained in:
Phil Christensen 2019-03-29 23:23:18 -07:00 committed by GitHub
parent 2d444958c6
commit 93ce6b4f27
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -1,27 +1,27 @@
include(vcpkg_common_functions)
set(SOURCE_PATH ${CURRENT_BUILDTREES_DIR}/src/ffmpeg-4.1)
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(
OUT_SOURCE_PATH SOURCE_PATH
ARCHIVE ${ARCHIVE}
PATCHES
create-lib-libraries.patch
detect-openssl.patch
configure_opencv.patch
fix_windowsinclude-in-ffmpegexe-1.patch
fix_windowsinclude-in-ffmpegexe-2.patch
fix_windowsinclude-in-ffmpegexe-3.patch
)
if (${SOURCE_PATH} MATCHES " ")
message(FATAL_ERROR "Error: ffmpeg will not build with spaces in the path. Please use a directory with no spaces")
endif()
vcpkg_extract_source_archive(${ARCHIVE})
vcpkg_apply_patches(
SOURCE_PATH ${SOURCE_PATH}
PATCHES
${CMAKE_CURRENT_LIST_DIR}/create-lib-libraries.patch
${CMAKE_CURRENT_LIST_DIR}/detect-openssl.patch
${CMAKE_CURRENT_LIST_DIR}/configure_opencv.patch
${CMAKE_CURRENT_LIST_DIR}/fix_windowsinclude-in-ffmpegexe-1.patch
${CMAKE_CURRENT_LIST_DIR}/fix_windowsinclude-in-ffmpegexe-2.patch
${CMAKE_CURRENT_LIST_DIR}/fix_windowsinclude-in-ffmpegexe-3.patch
)
vcpkg_find_acquire_program(YASM)
get_filename_component(YASM_EXE_PATH ${YASM} DIRECTORY)
set(ENV{PATH} "$ENV{PATH};${YASM_EXE_PATH}")