mirror of
https://github.com/microsoft/vcpkg.git
synced 2024-12-28 03:10:57 +08:00
[ffmpeg] fix up the pkgconfig files (#15127)
This commit is contained in:
parent
c898283a41
commit
b23b7ea09f
@ -1,6 +1,6 @@
|
||||
Source: ffmpeg
|
||||
Version: 4.3.1
|
||||
Port-Version: 8
|
||||
Port-Version: 9
|
||||
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.
|
||||
|
@ -511,6 +511,48 @@ endif()
|
||||
|
||||
vcpkg_copy_pdbs()
|
||||
|
||||
if (VCPKG_TARGET_IS_WINDOWS)
|
||||
# Translate cygpath to local path
|
||||
set(CYGPATH_CMD "${MSYS_ROOT}/usr/bin/cygpath.exe" -w)
|
||||
|
||||
foreach(PKGCONFIG_PATH "${CURRENT_PACKAGES_DIR}/debug/lib/pkgconfig" "${CURRENT_PACKAGES_DIR}/lib/pkgconfig")
|
||||
file(GLOB PKGCONFIG_FILES "${PKGCONFIG_PATH}/*.pc")
|
||||
foreach(PKGCONFIG_FILE IN LISTS PKGCONFIG_FILES)
|
||||
file(READ "${PKGCONFIG_FILE}" PKGCONFIG_CONTENT)
|
||||
foreach(PATH_NAME prefix libdir includedir)
|
||||
string(REGEX MATCH "${PATH_NAME}=[^\n]*\n" PATH_VALUE "${PKGCONFIG_CONTENT}")
|
||||
string(REPLACE "${PATH_NAME}=" "" PATH_VALUE "${PATH_VALUE}")
|
||||
string(REPLACE "\n" "" PATH_VALUE "${PATH_VALUE}")
|
||||
set("${PATH_NAME}_cygpath" "${PATH_VALUE}")
|
||||
endforeach()
|
||||
execute_process(
|
||||
COMMAND ${CYGPATH_CMD} "${prefix_cygpath}"
|
||||
OUTPUT_VARIABLE FIXED_PREFIX_PATH
|
||||
)
|
||||
string(REPLACE "\n" "" FIXED_PREFIX_PATH "${FIXED_PREFIX_PATH}")
|
||||
file(TO_CMAKE_PATH "${FIXED_PREFIX_PATH}" FIXED_PREFIX_PATH)
|
||||
execute_process(
|
||||
COMMAND ${CYGPATH_CMD} "${libdir_cygpath}"
|
||||
OUTPUT_VARIABLE FIXED_LIBDIR_PATH
|
||||
)
|
||||
string(REPLACE "\n" "" FIXED_LIBDIR_PATH ${FIXED_LIBDIR_PATH})
|
||||
file(TO_CMAKE_PATH ${FIXED_LIBDIR_PATH} FIXED_LIBDIR_PATH)
|
||||
execute_process(
|
||||
COMMAND ${CYGPATH_CMD} "${includedir_cygpath}"
|
||||
OUTPUT_VARIABLE FIXED_INCLUDE_PATH
|
||||
)
|
||||
string(REPLACE "\n" "" FIXED_INCLUDE_PATH "${FIXED_INCLUDE_PATH}")
|
||||
file(TO_CMAKE_PATH ${FIXED_INCLUDE_PATH} FIXED_INCLUDE_PATH)
|
||||
|
||||
vcpkg_replace_string("${PKGCONFIG_FILE}" "${prefix_cygpath}" "${FIXED_PREFIX_PATH}")
|
||||
vcpkg_replace_string("${PKGCONFIG_FILE}" "${libdir_cygpath}" "${FIXED_LIBDIR_PATH}")
|
||||
vcpkg_replace_string("${PKGCONFIG_FILE}" "${includedir_cygpath}" "${FIXED_INCLUDE_PATH}")
|
||||
endforeach()
|
||||
endforeach()
|
||||
endif()
|
||||
|
||||
vcpkg_fixup_pkgconfig()
|
||||
|
||||
# Handle copyright
|
||||
file(STRINGS ${CURRENT_BUILDTREES_DIR}/build-${TARGET_TRIPLET}-rel-out.log LICENSE_STRING REGEX "License: .*" LIMIT_COUNT 1)
|
||||
if(LICENSE_STRING STREQUAL "License: LGPL version 2.1 or later")
|
||||
|
Loading…
x
Reference in New Issue
Block a user