mirror of
https://github.com/microsoft/vcpkg.git
synced 2024-11-24 02:41:47 +08:00
[faad2] Update to 2.11.1 (#36646)
* [faad2] Update to 2.11.1 * update version * fix tools name * version --------- Co-authored-by: Lily Wang <v-lilywang@microsoft.com>
This commit is contained in:
parent
b28ee3ccd6
commit
1747449be8
@ -1,39 +0,0 @@
|
||||
cmake_minimum_required(VERSION 3.7.2)
|
||||
project (faad VERSION 2.10.1)
|
||||
|
||||
option(FAAD_BUILD_BINARIES "Build faad2 binaries" OFF)
|
||||
|
||||
file(GLOB_RECURSE FAAD_SOURCES "${CMAKE_CURRENT_LIST_DIR}/libfaad/*.c")
|
||||
file(GLOB_RECURSE FAAD_HEADERS "${CMAKE_CURRENT_LIST_DIR}/libfaad/*.h")
|
||||
|
||||
if (BUILD_SHARED_LIBS)
|
||||
list(APPEND FAAD_SOURCES "${CMAKE_CURRENT_LIST_DIR}/project/msvc/libfaad2.def")
|
||||
endif ()
|
||||
|
||||
add_definitions(-DSTDC_HEADERS -DPACKAGE_VERSION=\"${PROJECT_VERSION}\" -D_CRT_SECURE_NO_WARNINGS -DHAVE_LRINTF)
|
||||
include_directories(
|
||||
"${CMAKE_CURRENT_LIST_DIR}/include"
|
||||
"${CMAKE_CURRENT_LIST_DIR}/libfaad"
|
||||
)
|
||||
add_library(faad ${FAAD_SOURCES} ${FAAD_HEADERS})
|
||||
|
||||
if (FAAD_BUILD_BINARIES)
|
||||
include_directories(
|
||||
"${CMAKE_CURRENT_LIST_DIR}/frontend"
|
||||
)
|
||||
add_executable(faad_decoder
|
||||
"${CMAKE_SOURCE_DIR}/frontend/audio.c"
|
||||
"${CMAKE_SOURCE_DIR}/frontend/main.c"
|
||||
"${CMAKE_SOURCE_DIR}/frontend/mp4read.c"
|
||||
"${CMAKE_SOURCE_DIR}/frontend/unicode_support.c"
|
||||
)
|
||||
target_link_libraries(faad_decoder PRIVATE faad shell32)
|
||||
install(TARGETS faad_decoder DESTINATION "bin")
|
||||
endif ()
|
||||
|
||||
install(
|
||||
TARGETS faad
|
||||
ARCHIVE DESTINATION "lib"
|
||||
LIBRARY DESTINATION "lib"
|
||||
RUNTIME DESTINATION "bin"
|
||||
)
|
13
ports/faad2/fix-install.patch
Normal file
13
ports/faad2/fix-install.patch
Normal file
@ -0,0 +1,13 @@
|
||||
diff --git a/CMakeLists.txt b/CMakeLists.txt
|
||||
index 5c0aeff..9614c19 100644
|
||||
--- a/CMakeLists.txt
|
||||
+++ b/CMakeLists.txt
|
||||
@@ -261,7 +261,7 @@ endif()
|
||||
|
||||
# Installation
|
||||
|
||||
-if(NOT FAAD_BUNDLED_MODE AND NOT MSVC)
|
||||
+if(1)
|
||||
install(FILES "${CMAKE_CURRENT_BINARY_DIR}/faad2.pc"
|
||||
DESTINATION "${CMAKE_INSTALL_LIBDIR}/pkgconfig")
|
||||
|
@ -2,30 +2,28 @@ vcpkg_from_github(
|
||||
OUT_SOURCE_PATH SOURCE_PATH
|
||||
REPO knik0/faad2
|
||||
REF "${VERSION}"
|
||||
SHA512 8df69278350c68dd770c4bc482e42bc95eb04cd784eeea3f3fc58d615833c8b07dc3c72029bb7e5bfed612b7c1b8daefc9cb57be9789befb587120ef115e55b3
|
||||
SHA512 b8f17680610b2f47344ea52b54412a02810a85eaf9d4c91b97ca09b2c6415c62d4af1b0771bfcacb9dfee400ed34504c0bd3c28369921c0392b3809e7de46ec5
|
||||
HEAD_REF master
|
||||
)
|
||||
|
||||
file(COPY "${CMAKE_CURRENT_LIST_DIR}/CMakeLists.txt" DESTINATION "${SOURCE_PATH}")
|
||||
|
||||
vcpkg_check_features(OUT_FEATURE_OPTIONS FEATURE_OPTIONS
|
||||
FEATURES
|
||||
build-decoder FAAD_BUILD_BINARIES
|
||||
PATCHES
|
||||
fix-install.patch
|
||||
)
|
||||
|
||||
vcpkg_cmake_configure(
|
||||
SOURCE_PATH "${SOURCE_PATH}"
|
||||
OPTIONS ${FEATURE_OPTIONS}
|
||||
)
|
||||
|
||||
vcpkg_cmake_install()
|
||||
|
||||
file(REMOVE_RECURSE "${CURRENT_PACKAGES_DIR}/debug/include")
|
||||
vcpkg_copy_pdbs()
|
||||
vcpkg_fixup_pkgconfig()
|
||||
|
||||
if("build-decoder" IN_LIST FEATURES)
|
||||
vcpkg_copy_tools(TOOL_NAMES faad_decoder AUTO_CLEAN)
|
||||
if(VCPKG_TARGET_IS_WINDOWS)
|
||||
vcpkg_copy_tools(TOOL_NAMES faad_cli AUTO_CLEAN)
|
||||
else()
|
||||
vcpkg_copy_tools(TOOL_NAMES faad AUTO_CLEAN)
|
||||
endif()
|
||||
|
||||
file(INSTALL "${SOURCE_PATH}/include" DESTINATION "${CURRENT_PACKAGES_DIR}")
|
||||
file(REMOVE_RECURSE "${CURRENT_PACKAGES_DIR}/debug/include")
|
||||
file(REMOVE_RECURSE "${CURRENT_PACKAGES_DIR}/debug/share")
|
||||
|
||||
vcpkg_install_copyright(FILE_LIST "${SOURCE_PATH}/COPYING")
|
||||
|
@ -1,19 +1,13 @@
|
||||
{
|
||||
"name": "faad2",
|
||||
"version": "2.10.1",
|
||||
"version": "2.11.1",
|
||||
"description": "Freeware Advanced Audio (AAC) Decoder",
|
||||
"homepage": "https://sourceforge.net/projects/faac/",
|
||||
"license": "GPL-2.0-or-later",
|
||||
"supports": "windows",
|
||||
"dependencies": [
|
||||
{
|
||||
"name": "vcpkg-cmake",
|
||||
"host": true
|
||||
}
|
||||
],
|
||||
"features": {
|
||||
"build-decoder": {
|
||||
"description": "Build the embedded decoder executable"
|
||||
}
|
||||
}
|
||||
]
|
||||
}
|
||||
|
@ -2541,7 +2541,7 @@
|
||||
"port-version": 0
|
||||
},
|
||||
"faad2": {
|
||||
"baseline": "2.10.1",
|
||||
"baseline": "2.11.1",
|
||||
"port-version": 0
|
||||
},
|
||||
"fadbad": {
|
||||
|
@ -1,5 +1,10 @@
|
||||
{
|
||||
"versions": [
|
||||
{
|
||||
"git-tree": "60bebbccf8a5258a6cf7ff00ef78ca0e3450b9fb",
|
||||
"version": "2.11.1",
|
||||
"port-version": 0
|
||||
},
|
||||
{
|
||||
"git-tree": "8109afd383b568e26f0d671384d067fa5fa7cc2e",
|
||||
"version": "2.10.1",
|
||||
|
Loading…
Reference in New Issue
Block a user