mirror of
https://github.com/microsoft/vcpkg.git
synced 2024-12-04 03:09:07 +08:00
[libvpx] Add pkgconfig (#19355)
* [libvpx] Add pkgconfig check * Update version files * Add vpx.pc.in on Windows * Update versions/l-/libvpx.json * Remove -lm from vpx.pc.in file * Update versions/l-/libvpx.json * Remove debug messages * Update versions/l-/libvpx.json
This commit is contained in:
parent
409c1c4a05
commit
44fac549c4
@ -33,7 +33,7 @@ vcpkg_add_to_path(${NASM_EXE_PATH})
|
||||
|
||||
if(VCPKG_TARGET_IS_WINDOWS AND NOT VCPKG_TARGET_IS_MINGW)
|
||||
|
||||
file(REMOVE_RECURSE ${CURRENT_BUILDTREES_DIR}/${TARGET_TRIPLET})
|
||||
file(REMOVE_RECURSE "${CURRENT_BUILDTREES_DIR}/${TARGET_TRIPLET}")
|
||||
|
||||
if(VCPKG_CRT_LINKAGE STREQUAL static)
|
||||
set(LIBVPX_CRT_LINKAGE --enable-static-msvcrt)
|
||||
@ -71,7 +71,7 @@ if(VCPKG_TARGET_IS_WINDOWS AND NOT VCPKG_TARGET_IS_MINGW)
|
||||
endif()
|
||||
|
||||
message(STATUS "Generating makefile")
|
||||
file(MAKE_DIRECTORY ${CURRENT_BUILDTREES_DIR}/${TARGET_TRIPLET})
|
||||
file(MAKE_DIRECTORY "${CURRENT_BUILDTREES_DIR}/${TARGET_TRIPLET}")
|
||||
vcpkg_execute_required_process(
|
||||
COMMAND
|
||||
${BASH} --noprofile --norc
|
||||
@ -126,11 +126,20 @@ if(VCPKG_TARGET_IS_WINDOWS AND NOT VCPKG_TARGET_IS_MINGW)
|
||||
endif()
|
||||
file(
|
||||
INSTALL
|
||||
${LIBVPX_INCLUDE_DIR}
|
||||
"${LIBVPX_INCLUDE_DIR}"
|
||||
DESTINATION
|
||||
"${CURRENT_PACKAGES_DIR}/include"
|
||||
RENAME
|
||||
"vpx")
|
||||
if (NOT DEFINED VCPKG_BUILD_TYPE OR VCPKG_BUILD_TYPE STREQUAL "release")
|
||||
set(LIBVPX_PREFIX "${CURRENT_INSTALLED_DIR}")
|
||||
configure_file("${CMAKE_CURRENT_LIST_DIR}/vpx.pc.in" "${CURRENT_PACKAGES_DIR}/lib/pkgconfig/vpx.pc" @ONLY)
|
||||
endif()
|
||||
|
||||
if (NOT DEFINED VCPKG_BUILD_TYPE OR VCPKG_BUILD_TYPE STREQUAL "debug")
|
||||
set(LIBVPX_PREFIX "${CURRENT_INSTALLED_DIR}/debug")
|
||||
configure_file("${CMAKE_CURRENT_LIST_DIR}/vpx.pc.in" "${CURRENT_PACKAGES_DIR}/debug/lib/pkgconfig/vpx.pc" @ONLY)
|
||||
endif()
|
||||
|
||||
else()
|
||||
|
||||
@ -177,7 +186,7 @@ else()
|
||||
|
||||
if(NOT DEFINED VCPKG_BUILD_TYPE OR VCPKG_BUILD_TYPE STREQUAL "release")
|
||||
message(STATUS "Configuring libvpx for Release")
|
||||
file(MAKE_DIRECTORY ${CURRENT_BUILDTREES_DIR}/${TARGET_TRIPLET}-rel)
|
||||
file(MAKE_DIRECTORY "${CURRENT_BUILDTREES_DIR}/${TARGET_TRIPLET}-rel")
|
||||
vcpkg_execute_required_process(
|
||||
COMMAND
|
||||
${BASH} --noprofile --norc
|
||||
@ -210,7 +219,7 @@ else()
|
||||
|
||||
if(NOT DEFINED VCPKG_BUILD_TYPE OR VCPKG_BUILD_TYPE STREQUAL "debug")
|
||||
message(STATUS "Configuring libvpx for Debug")
|
||||
file(MAKE_DIRECTORY ${CURRENT_BUILDTREES_DIR}/${TARGET_TRIPLET}-dbg)
|
||||
file(MAKE_DIRECTORY "${CURRENT_BUILDTREES_DIR}/${TARGET_TRIPLET}-dbg")
|
||||
vcpkg_execute_required_process(
|
||||
COMMAND
|
||||
${BASH} --noprofile --norc
|
||||
@ -238,17 +247,19 @@ else()
|
||||
LOGNAME install-${TARGET_TRIPLET}-dbg
|
||||
)
|
||||
|
||||
file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/include)
|
||||
file(REMOVE ${CURRENT_PACKAGES_DIR}/debug/lib/libvpx_g.a)
|
||||
file(REMOVE_RECURSE "${CURRENT_PACKAGES_DIR}/debug/include")
|
||||
file(REMOVE "${CURRENT_PACKAGES_DIR}/debug/lib/libvpx_g.a")
|
||||
endif()
|
||||
endif()
|
||||
|
||||
vcpkg_fixup_pkgconfig()
|
||||
|
||||
if(NOT DEFINED VCPKG_BUILD_TYPE OR VCPKG_BUILD_TYPE STREQUAL "debug")
|
||||
set(LIBVPX_CONFIG_DEBUG ON)
|
||||
else()
|
||||
set(LIBVPX_CONFIG_DEBUG OFF)
|
||||
endif()
|
||||
|
||||
configure_file(${CMAKE_CURRENT_LIST_DIR}/unofficial-libvpx-config.cmake.in ${CURRENT_PACKAGES_DIR}/share/unofficial-libvpx/unofficial-libvpx-config.cmake @ONLY)
|
||||
configure_file("${CMAKE_CURRENT_LIST_DIR}/unofficial-libvpx-config.cmake.in" "${CURRENT_PACKAGES_DIR}/share/unofficial-libvpx/unofficial-libvpx-config.cmake" @ONLY)
|
||||
|
||||
file(INSTALL ${SOURCE_PATH}/LICENSE DESTINATION ${CURRENT_PACKAGES_DIR}/share/${PORT} RENAME copyright)
|
||||
file(INSTALL "${SOURCE_PATH}/LICENSE" DESTINATION "${CURRENT_PACKAGES_DIR}/share/${PORT}" RENAME copyright)
|
||||
|
@ -1,6 +1,7 @@
|
||||
{
|
||||
"name": "libvpx",
|
||||
"version-semver": "1.10.0",
|
||||
"port-version": 1,
|
||||
"description": "The reference software implementation for the video coding formats VP8 and VP9.",
|
||||
"homepage": "https://github.com/webmproject/libvpx"
|
||||
}
|
||||
|
13
ports/libvpx/vpx.pc.in
Normal file
13
ports/libvpx/vpx.pc.in
Normal file
@ -0,0 +1,13 @@
|
||||
prefix=@LIBVPX_PREFIX@
|
||||
# pkg-config file from libvpx v1.10.0
|
||||
exec_prefix=${prefix}
|
||||
libdir=${prefix}/lib
|
||||
includedir=${prefix}/include
|
||||
|
||||
Name: vpx
|
||||
Description: WebM Project VPx codec implementation
|
||||
Version: @LIBVPX_VERSION@
|
||||
Requires:
|
||||
Conflicts:
|
||||
Libs: -L"${libdir}" -lvpx
|
||||
Cflags: -I"${includedir}"
|
@ -3782,7 +3782,7 @@
|
||||
},
|
||||
"libvpx": {
|
||||
"baseline": "1.10.0",
|
||||
"port-version": 0
|
||||
"port-version": 1
|
||||
},
|
||||
"libwandio": {
|
||||
"baseline": "4.2.1",
|
||||
|
@ -1,5 +1,10 @@
|
||||
{
|
||||
"versions": [
|
||||
{
|
||||
"git-tree": "55be5e09000631b1dacd6f86d174eb2cade91bf5",
|
||||
"version-semver": "1.10.0",
|
||||
"port-version": 1
|
||||
},
|
||||
{
|
||||
"git-tree": "ba9e1f9d346412c76f17d9fda5a3fbd5b5555afa",
|
||||
"version-semver": "1.10.0",
|
||||
|
Loading…
Reference in New Issue
Block a user