mirror of
https://github.com/microsoft/vcpkg.git
synced 2024-12-25 05:17:50 +08:00
f33ec92a5b
FAAD2 lists its homepage as https://sourceforge.net/projects/faac/, but it links to https://github.com/knik0/faad2 as the place to send pull requests. This seems good enough for Debian[0] and Arch[1], and the SF hosts only a bit older versions, so I used the GitHub project as well. Note that though the project is named "faad2", the library name is just "faad" The embedded patches were all submitted and already merged upstream. [0] https://packages.debian.org/sid/faad [1] https://www.archlinux.org/packages/extra/x86_64/faad2/
39 lines
1.2 KiB
CMake
39 lines
1.2 KiB
CMake
cmake_minimum_required(VERSION 3.1)
|
|
project (faad VERSION 2.9.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)
|
|
endif ()
|
|
|
|
install(
|
|
TARGETS faad
|
|
ARCHIVE DESTINATION "lib"
|
|
LIBRARY DESTINATION "lib"
|
|
RUNTIME DESTINATION "bin"
|
|
)
|