Merge pull request #21748 from kreinholz/master

Experimental ffmpeg-build cmake module
This commit is contained in:
Henrik Rydgård
2026-05-31 13:24:41 +02:00
committed by GitHub
11 changed files with 3341 additions and 70 deletions
+87 -70
View File
@@ -80,7 +80,7 @@ if(CMAKE_SYSTEM_PROCESSOR)
endif()
# the libraries in the ffmpeg/ directory are not compatible with mingw
if(MINGW AND NOT USE_SYSTEM_FFMPEG)
if(MINGW AND NOT USE_SYSTEM_FFMPEG AND NOT BUILD_BUNDLED_FFMPEG)
set(USE_SYSTEM_FFMPEG ON)
endif()
@@ -202,6 +202,7 @@ option(USE_DISCORD "Build with Discord support" ON)
option(USE_MINIUPNPC "Build with miniUPnPc support" ON)
option(USE_SYSTEM_SNAPPY "Dynamically link against system snappy" ${USE_SYSTEM_SNAPPY})
option(USE_SYSTEM_FFMPEG "Dynamically link against system FFMPEG" ${USE_SYSTEM_FFMPEG})
option(BUILD_BUNDLED_FFMPEG "Build bundled ffmpeg module" ${BUILD_BUNDLED_FFMPEG})
option(USE_SYSTEM_FREETYPE "Dynamically link against system freetype" ${USE_SYSTEM_FREETYPE})
option(USE_SYSTEM_LIBCHDR "Dynamically link against system libchdr" ${USE_SYSTEM_LIBCHDR})
option(USE_SYSTEM_LIBZIP "Dynamically link against system libzip" ${USE_SYSTEM_LIBZIP})
@@ -996,81 +997,86 @@ add_library(vma STATIC
)
if(USE_FFMPEG)
if(NOT FFMPEG_DIR)
if(NOT USE_SYSTEM_FFMPEG)
if(ANDROID)
if(ARMV7)
set(PLATFORM_ARCH "android/armv7")
elseif(ARM64)
set(PLATFORM_ARCH "android/arm64")
elseif(X86_64)
set(PLATFORM_ARCH "android/x86_64")
elseif(X86)
set(PLATFORM_ARCH "android/x86")
if(NOT BUILD_BUNDLED_FFMPEG)
if(NOT FFMPEG_DIR)
if(NOT USE_SYSTEM_FFMPEG)
if(ANDROID)
if(ARMV7)
set(PLATFORM_ARCH "android/armv7")
elseif(ARM64)
set(PLATFORM_ARCH "android/arm64")
elseif(X86_64)
set(PLATFORM_ARCH "android/x86_64")
elseif(X86)
set(PLATFORM_ARCH "android/x86")
endif()
elseif(IOS)
if(IOS_PLATFORM STREQUAL "TVOS")
set(PLATFORM_ARCH "tvos/arm64")
else()
set(PLATFORM_ARCH "ios/universal")
endif()
elseif(MACOSX)
set(PLATFORM_ARCH "macosx/universal")
elseif(LINUX)
if(ARMV7)
set(PLATFORM_ARCH "linux/armv7")
elseif(ARM64)
set(PLATFORM_ARCH "linux/aarch64")
elseif(ARM)
set(PLATFORM_ARCH "linux/arm")
elseif(MIPS)
set(PLATFORM_ARCH "linux/mips32")
elseif(RISCV64)
set(PLATFORM_ARCH "linux/riscv64")
elseif(LOONGARCH64)
set(PLATFORM_ARCH "linux/loongarch64")
elseif(CMAKE_SIZEOF_VOID_P EQUAL 8)
set(PLATFORM_ARCH "linux/x86_64")
elseif(X86)
set(PLATFORM_ARCH "linux/x86")
endif()
elseif(WIN32)
if(X86_64)
set(PLATFORM_ARCH "Windows/x86_64")
elseif(X86)
set(PLATFORM_ARCH "Windows/x86")
endif()
endif()
elseif(IOS)
if(IOS_PLATFORM STREQUAL "TVOS")
set(PLATFORM_ARCH "tvos/arm64")
if(WEBOS AND ARMV7)
set(PLATFORM_ARCH "linux/webos")
endif()
if(PLATFORM_ARCH)
set(FFMPEG_DIR "ffmpeg/${PLATFORM_ARCH}")
else()
set(PLATFORM_ARCH "ios/universal")
message("Couldn't find an internal FFmpeg build, using system FFmpeg instead")
endif()
elseif(MACOSX)
set(PLATFORM_ARCH "macosx/universal")
elseif(LINUX)
if(ARMV7)
set(PLATFORM_ARCH "linux/armv7")
elseif(ARM64)
set(PLATFORM_ARCH "linux/aarch64")
elseif(ARM)
set(PLATFORM_ARCH "linux/arm")
elseif(MIPS)
set(PLATFORM_ARCH "linux/mips32")
elseif(RISCV64)
set(PLATFORM_ARCH "linux/riscv64")
elseif(LOONGARCH64)
set(PLATFORM_ARCH "linux/loongarch64")
elseif(CMAKE_SIZEOF_VOID_P EQUAL 8)
set(PLATFORM_ARCH "linux/x86_64")
elseif(X86)
set(PLATFORM_ARCH "linux/x86")
endif()
elseif(WIN32)
if(X86_64)
set(PLATFORM_ARCH "Windows/x86_64")
elseif(X86)
set(PLATFORM_ARCH "Windows/x86")
endif()
endif()
if(WEBOS AND ARMV7)
set(PLATFORM_ARCH "linux/webos")
endif()
if(PLATFORM_ARCH)
set(FFMPEG_DIR "ffmpeg/${PLATFORM_ARCH}")
else()
message("Couldn't find an internal FFmpeg build, using system FFmpeg instead")
endif()
endif()
find_package(FFmpeg REQUIRED avcodec avformat avutil swresample swscale)
# Check if we need to use avcodec_(alloc|free)_frame instead of av_frame_(alloc|free)
# Check if we need to use const AVCodec
set(CMAKE_REQUIRED_INCLUDES ${FFmpeg_INCLUDE_avcodec};${FFmpeg_INCLUDE_avformat})
set(CMAKE_REQUIRED_LIBRARIES FFmpeg::avcodec;FFmpeg::avformat)
set(CMAKE_REQUIRED_FLAGS "-pedantic -Wall -Werror -Wno-unused-variable")
check_cxx_source_compiles("extern \"C\" {
#include <libavcodec/avcodec.h>
#include <libavformat/avformat.h>
}
static AVCodecContext *s_codec_context = NULL;
int main() {
const AVCodec *codec = avcodec_find_encoder(s_codec_context->codec_id);
return 0;
}
" HAVE_LIBAVCODEC_CONST_AVCODEC FAIL_REGEX "invalid conversion")
# Check if we need to use avcodec_alloc_context3 instead of stream->codec
# Check if we need to use av_frame_get_buffer instead of avcodec_default_get_buffer
endif()
if(BUILD_BUNDLED_FFMPEG)
set(CMAKE_REQUIRED_FLAGS "-pedantic -Wall -Werror -Wno-unused-variable")
endif()
find_package(FFmpeg REQUIRED avcodec avformat avutil swresample swscale)
# Check if we need to use avcodec_(alloc|free)_frame instead of av_frame_(alloc|free)
# Check if we need to use const AVCodec
set(CMAKE_REQUIRED_INCLUDES ${FFmpeg_INCLUDE_avcodec};${FFmpeg_INCLUDE_avformat})
set(CMAKE_REQUIRED_LIBRARIES FFmpeg::avcodec;FFmpeg::avformat)
set(CMAKE_REQUIRED_FLAGS "-pedantic -Wall -Werror -Wno-unused-variable")
check_cxx_source_compiles("extern \"C\" {
#include <libavcodec/avcodec.h>
#include <libavformat/avformat.h>
}
static AVCodecContext *s_codec_context = NULL;
int main() {
const AVCodec *codec = avcodec_find_encoder(s_codec_context->codec_id);
return 0;
}
" HAVE_LIBAVCODEC_CONST_AVCODEC FAIL_REGEX "invalid conversion")
# Check if we need to use avcodec_alloc_context3 instead of stream->codec
# Check if we need to use av_frame_get_buffer instead of avcodec_default_get_buffer
endif(USE_FFMPEG)
find_package(ZLIB)
@@ -2665,6 +2671,17 @@ if(FFmpeg_FOUND)
FFmpeg::swscale
${ZLIB_LIBRARY}
)
elseif(BUILD_BUNDLED_FFMPEG)
target_compile_definitions(${CoreLibName} PRIVATE USE_FFMPEG=1)
set_target_properties(${CoreLibName} PROPERTIES NO_SYSTEM_FROM_IMPORTED true)
target_link_libraries(${CoreLibName}
avcodec
avformat
avutil
swresample
swscale
${ZLIB_LIBRARY}
)
endif()
# Discord integration
+4
View File
@@ -60,6 +60,10 @@ if(NOT USE_SYSTEM_LIBCHDR)
add_subdirectory(libchdr-build)
endif()
if(BUILD_BUNDLED_FFMPEG)
add_subdirectory(ffmpeg-build)
endif()
if(ANDROID)
if (ARM64)
add_subdirectory(libadrenotools)
+109
View File
@@ -0,0 +1,109 @@
cmake_minimum_required (VERSION 3.13.0)
project (ffmpeg)
include(FindPkgConfig)
# Threads are required
find_package(Threads REQUIRED)
set(SRC_DIR ../../ffmpeg)
set(LIBAVCODEC_SRC_DIR ${SRC_DIR}/libavcodec)
set(LIBAVFORMAT_SRC_DIR ${SRC_DIR}/libavformat)
set(LIBAVUTIL_SRC_DIR ${SRC_DIR}/libavutil)
set(LIBSWRESAMPLE_SRC_DIR ${SRC_DIR}/libswresample)
set(LIBSWSCALE_SRC_DIR ${SRC_DIR}/libswscale)
# Check for exotic cross-compiling configurations such as MinGW sysroot with clang compiler
if(WIN32 AND NOT MSVC)
set(MINGW_SYSROOT TRUE)
elseif(CMAKE_SYSTEM_NAME STREQUAL "Windows" AND CMAKE_C_COMPILER_TARGET MATCHES "mingw")
set(MINGW_SYSROOT TRUE)
endif()
# Additional lib and include dirs for configure checks
set(ADDL_INCLUDES "")
set(ADDL_LIB_DIRS "")
# For cross-compiling, let CMake handle the sysroot via search paths (although toolchains probably already do this)
if(CMAKE_CROSSCOMPILING)
set(CMAKE_FIND_ROOT_PATH_MODE_PROGRAM NEVER)
set(CMAKE_FIND_ROOT_PATH_MODE_LIBRARY ONLY)
set(CMAKE_FIND_ROOT_PATH_MODE_INCLUDE ONLY)
set(CMAKE_FIND_ROOT_PATH_MODE_PACKAGE ONLY)
else()
if(NOT CMAKE_OSX_SYSROOT AND UNIX AND NOT APPLE)
list(APPEND ADDL_INCLUDES "/usr/local/include")
list(APPEND ADDL_LIB_DIRS "/usr/local/lib")
endif()
endif()
# Silence warnings due to design philosophy differences between ffmpeg and modern compilers
# Taken primarily from meson-ports/ffmpeg's meson.build script at
# https://gitlab.freedesktop.org/gstreamer/meson-ports/ffmpeg/-/blob/meson-4.4/meson.build?ref_type=heads
if (MSVC AND NOT (CMAKE_C_COMPILER_ID STREQUAL "Clang"))
add_compile_options(/wd4005 /wd4018 /wd4146 /wd4244 /wd4305 /wd4554 /wd4114 /wd4028 /wd4090 /wd4133)
else() # Compiler options for both clang and gcc (includes clang-cl in MSVC mode)
add_compile_options(-D_LARGEFILE_SOURCE -DPIC -Wno-parentheses -Wno-pointer-sign -Wno-switch -Wno-format-truncation -Wno-deprecated-declarations -Wno-unused-function -Wno-uninitialized -Wno-ignored-qualifiers -Wno-unused-variable -Wno-bool-operation -Wno-incompatible-pointer-types -Wno-address -Wno-empty-body)
endif()
if (CMAKE_C_COMPILER_ID STREQUAL "Clang") # additional options not recognized by gcc
add_compile_options(-Wno-string-plus-int -Wno-implicit-const-int-float-conversion)
endif()
# Run an abbreviated version of ffmpeg's configure script's checks required to generate usable config.h,
# libavutil/avconfig.h, and libavutil/ffversion.h headers with hardcoded minimal features required by PPSSPP
include(configure_checks.cmake)
# libavcodec
include(libs/libavcodec.cmake)
add_library(avcodec STATIC ${LIBAVCODEC_SOURCE_FILES})
set_target_properties(avcodec PROPERTIES POSITION_INDEPENDENT_CODE TRUE) # Enable PIC
target_precompile_headers(avcodec PRIVATE ${LIBAVUTIL_SRC_DIR}/internal.h ${LIBAVUTIL_SRC_DIR}/intmath.h)
target_link_libraries(avcodec)
target_include_directories(avcodec PRIVATE ${SRC_DIR} ${CMAKE_CURRENT_BINARY_DIR})
target_include_directories(avcodec INTERFACE ${LIBAVCODEC_HEADERS}) # expose libavcodec headers to PPSSPP build
set(LIBAVCODEC_LIBRARY avcodec)
# libavformat
include(libs/libavformat.cmake)
add_library(avformat STATIC ${LIBAVFORMAT_SOURCE_FILES})
set_target_properties(avformat PROPERTIES POSITION_INDEPENDENT_CODE TRUE) # Enable PIC
target_precompile_headers(avformat PRIVATE ${CMAKE_CURRENT_BINARY_DIR}/config.h ${LIBAVUTIL_SRC_DIR}/internal.h)
target_link_libraries(avformat PUBLIC avcodec)
target_include_directories(avformat PRIVATE ${SRC_DIR} ${CMAKE_CURRENT_BINARY_DIR})
target_include_directories(avformat INTERFACE ${LIBAVFORMAT_HEADERS})
set(LIBAVFORMAT_LIBRARY avformat)
# libavutil
include(libs/libavutil.cmake)
add_library(avutil STATIC ${LIBAVUTIL_SOURCE_FILES})
target_precompile_headers(avutil PRIVATE
${CMAKE_CURRENT_BINARY_DIR}/libavutil/ffversion.h
${CMAKE_CURRENT_BINARY_DIR}/libavutil/avconfig.h
${LIBAVUTIL_SRC_DIR}/internal.h
)
set_target_properties(avutil PROPERTIES POSITION_INDEPENDENT_CODE TRUE) # Enable PIC
target_link_libraries(avutil)
target_include_directories(avutil PRIVATE ${SRC_DIR} ${CMAKE_CURRENT_BINARY_DIR})
target_include_directories(avutil INTERFACE ${LIBAVUTIL_HEADERS})
set(LIBAVUTIL_LIBRARY avutil)
# libswresample
include(libs/libswresample.cmake)
add_library(swresample STATIC ${LIBSWRESAMPLE_SOURCE_FILES})
set_target_properties(swresample PROPERTIES POSITION_INDEPENDENT_CODE TRUE) # Enable PIC
target_precompile_headers(swresample PRIVATE ${LIBAVUTIL_SRC_DIR}/cpu.h ${LIBAVUTIL_SRC_DIR}/internal.h)
target_link_libraries(swresample)
target_include_directories(swresample PUBLIC ${SRC_DIR} ${CMAKE_CURRENT_BINARY_DIR})
target_include_directories(swresample INTERFACE ${LIBSWRESAMPLE_HEADERS})
set(LIBSWRESAMPLE_LIBRARY swresample)
# libswscale
include(libs/libswscale.cmake)
add_library(swscale STATIC ${LIBSWSCALE_SOURCE_FILES})
set_target_properties(swscale PROPERTIES POSITION_INDEPENDENT_CODE TRUE) # Enable PIC
target_precompile_headers(swscale PRIVATE ${LIBAVUTIL_SRC_DIR}/internal.h)
target_link_libraries(swscale)
target_include_directories(swscale PRIVATE ${SRC_DIR} ${CMAKE_CURRENT_BINARY_DIR})
target_include_directories(swscale INTERFACE ${LIBSWSCALE_HEADERS})
set(LIBSWSCALE_LIBRARY swscale)
File diff suppressed because it is too large Load Diff
File diff suppressed because one or more lines are too long
+289
View File
@@ -0,0 +1,289 @@
# configure_functions.cmake - various functions from ffmpeg's configure script rewritten for cmake
# Note: in order to not break ffmpeg, we need to arrive at the same result as ffmpeg's configure script's checks, so instead of relying solely on cmake modules, I ported ffmpeg's configure script's functions needed below.
# Create a directory to store all of our tests
set(CONFIG_TESTS_DIR "${CMAKE_CURRENT_BINARY_DIR}/configure_checks")
file(MAKE_DIRECTORY ${CONFIG_TESTS_DIR})
include(CheckIncludeFile)
include(CheckIncludeFiles)
# Rewrite of ffmpeg's check_cc function at line 866 of configure script
function(check_cc target ARGUMENTS RESULT_VAR)
set(EXTRA_LIBS "")
set(EXTRA_FLAGS "")
set(ADDL_LIB_DIRS_CLEAN "")
set(COMPILE_INCLUDES "")
foreach(arg IN ITEMS ${ARGN} ${ADDL_LIB_DIRS} ${ADDL_INCLUDES})
# Windows-specific libs
if(MSVC AND arg MATCHES "^-l(msvcrt|shell32|advapi32|user32|gdi32|kernel32|psapi|ws2_32)")
string(REGEX REPLACE "^-l" "" clean_lib "${arg}")
list(APPEND EXTRA_LIBS "${clean_lib}.lib")
# Standard UNIX linker flags
elseif(arg MATCHES "^-l")
list(APPEND EXTRA_LIBS "${arg}")
# Absolute library paths (.lib, .a, .so, etc.)
elseif(IS_ABSOLUTE "${arg}" AND arg MATCHES "\\.(lib|a|so|dylib)$")
list(APPEND EXTRA_LIBS "${arg}")
# Library Directory flags (Unix: -L, MSVC: /LIBPATH: or -libpath:)
elseif(arg MATCHES "^-L")
string(SUBSTRING "${arg}" 2 -1 clean_dir)
list(APPEND ADDL_LIB_DIRS_CLEAN "${clean_dir}")
elseif(arg MATCHES "^[-/][Ll][Ii][Bb][Pp][Aa][Tt][Hh]:")
string(REGEX REPLACE "^[-/][Ll][Ii][Bb][Pp][Aa][Tt][Hh]:" "" clean_dir "${arg}")
list(APPEND ADDL_LIB_DIRS_CLEAN "${clean_dir}")
# Include Directory flags (Unix: -I, MSVC: /I or -I) or raw paths from ADDL_INCLUDES
elseif(arg MATCHES "^[-/]I")
string(REGEX REPLACE "^[-/]I" "" clean_dir "${arg}")
list(APPEND COMPILE_INCLUDES "${clean_dir}")
# Deal with raw paths if they didn't match any of the above patterns
elseif(IS_DIRECTORY "${arg}")
if(arg IN_LIST ADDL_INCLUDES)
list(APPEND COMPILE_INCLUDES "${arg}")
else()
list(APPEND ADDL_LIB_DIRS_CLEAN "${arg}")
endif()
# Everything else is a compiler option flag
else()
list(APPEND EXTRA_FLAGS "${arg}")
endif()
endforeach()
# Clean up duplicate paths/extra libs
foreach(list_var IN ITEMS EXTRA_LIBS ADDL_LIB_DIRS_CLEAN EXTRA_FLAGS COMPILE_INCLUDES)
if(${list_var})
list(REMOVE_DUPLICATES ${list_var})
endif()
endforeach()
# Check if ARGUMENTS contains a variation of main function definition
string(REGEX MATCH "int[ \t\r\n]+main[ \t\r\n]*\\(" HAS_MAIN "${ARGUMENTS}")
if(NOT HAS_MAIN)
# Append a standard int main() block to the end of the existing source code as a failsafe
string(APPEND ARGUMENTS "\n\nint main(void) {\n return 0;\n}\n")
endif()
set(TEST_SOURCE "${CONFIG_TESTS_DIR}/${target}.c")
file(WRITE "${TEST_SOURCE}" "${ARGUMENTS}")
set(OUTPUT_OBJ "${CONFIG_TESTS_DIR}/${target}.o")
try_compile(COMPILE_RESULT
"${CONFIG_TESTS_DIR}"
"${TEST_SOURCE}"
COMPILE_DEFINITIONS ${EXTRA_FLAGS}
LINK_LIBRARIES ${EXTRA_LIBS}
CMAKE_FLAGS
"-DINCLUDE_DIRECTORIES:PATH=${COMPILE_INCLUDES}"
"-DLINK_DIRECTORIES:PATH=${ADDL_LIB_DIRS_CLEAN}"
COPY_FILE "${OUTPUT_OBJ}"
OUTPUT_VARIABLE COMPILE_OUTPUT
)
if(COMPILE_RESULT)
message(STATUS "${target} check passed")
set(${RESULT_VAR} 1 PARENT_SCOPE)
else()
message(STATUS "${target} check failed") # Standard message to not clutter build logs overmuch
# message(STATUS "${target} check failed. Error:\n${COMPILE_OUTPUT}")
# message(STATUS "${target} check failed. See ${target}_error.log for details")
# file(WRITE "${CONFIG_TESTS_DIR}/${target}_error.log" "${COMPILE_OUTPUT}")
endif()
endfunction()
# Rewrite of fmpeg's check_ld function at line 953 of configure script
function(check_ld target ARGUMENTS EXTERNAL_LIB RESULT_VAR)
set(ALL_ARGS ${ARGN})
list(APPEND ALL_ARGS "${EXTERNAL_LIB}")
check_cc("${target}" "${ARGUMENTS}" CC_RESULT ${ALL_ARGS})
if(CC_RESULT)
set(${RESULT_VAR} 1 PARENT_SCOPE)
endif()
endfunction()
# Rewrite of ffmpeg's check_code function at line 972 of configure script
function(check_code target compiler headers ARGUMENTS RESULT_VAR)
set(EXTRA_FLAGS "")
foreach(arg IN ITEMS ${ARGN})
# Append to EXTRA_FLAGS
if(EXTRA_FLAGS STREQUAL "")
set(EXTRA_FLAGS "${arg}")
else()
list(APPEND EXTRA_FLAGS "${arg}")
endif()
endforeach()
# Check whether more than 1 header file was passed as a function argument
list(LENGTH headers len)
if (len GREATER 1)
foreach(header IN LISTS headers)
string(APPEND HEADERS_STRING "#include ${header}\n")
endforeach()
elseif (headers STREQUAL "")
set(HEADERS_STRING "")
else()
set(HEADERS_STRING "#include ${headers}")
endif()
set(test_func "check_${compiler}")
if (NOT ${test_func} STREQUAL "check_ld")
set(TEST_CODE "${HEADERS_STRING}\nint main(void) { ${ARGUMENTS};\nreturn 0; }")
cmake_language(CALL ${test_func} ${target} "${TEST_CODE}" ${RESULT_VAR} ${EXTRA_FLAGS})
else()
set(TEST_CODE "${HEADERS_STRING}\nint main(void) { ${ARGUMENTS};\nreturn 0; }")
cmake_language(CALL ${test_func} ${target} "${TEST_CODE}" "" ${RESULT_VAR} ${EXTRA_FLAGS})
endif()
set(${RESULT_VAR} "${${RESULT_VAR}}" PARENT_SCOPE)
endfunction()
# Rewrite of ffmpeg's check_header function at line 1053 of configure script
function(check_header target header flag RESULT_VAR)
set(Backup_Flags ${CMAKE_REQUIRED_FLAGS})
if(flag)
string(APPEND CMAKE_REQUIRED_FLAGS " ${flag}")
endif()
if (header MATCHES ";")
check_include_files("${header}" ${RESULT_VAR})
else()
check_include_file(${header} ${RESULT_VAR} "${flag}")
endif()
set(CMAKE_REQUIRED_FLAGS ${Backup_Flags})
set(${RESULT_VAR} "${${RESULT_VAR}}" PARENT_SCOPE)
endfunction()
# Rewrite of ffmpeg's check_func function at line 1076 of configure script
function(check_func target func RESULT_VAR)
set(EXTRA_FLAGS "")
foreach(arg IN ITEMS ${ARGN})
# Append to EXTRA_FLAGS
if(EXTRA_FLAGS STREQUAL "")
set(EXTRA_FLAGS "${arg}")
else()
list(APPEND EXTRA_FLAGS "${arg}")
endif()
endforeach()
set(TEST_CODE "extern int ${func}();\nint main(void){ ${func}(); }")
check_ld(${target} "${TEST_CODE}" "" ${RESULT_VAR} ${EXTRA_FLAGS})
set(${RESULT_VAR} "${${RESULT_VAR}}" PARENT_SCOPE)
endfunction()
# Rewrite of ffmpeg's check_complexfunc function at line 1087 of configure script
function(check_complexfunc target func RESULT_VAR)
set(TEST_CODE "#include <complex.h>\n#include <math.h>\nfloat foo(complex float f, complex float g) { return ${func}(f * I); \}\nint main(void){ return (int) foo; \}")
if(MSVC)
check_ld(${target} "${TEST_CODE}" "-lmsvcrt" ${RESULT_VAR})
else()
check_ld(${target} "${TEST_CODE}" "-lm" ${RESULT_VAR})
endif()
set(${RESULT_VAR} "${${RESULT_VAR}}" PARENT_SCOPE)
endfunction()
# Rewrite of ffmpeg's check_mathfunc function at line 1102 of configure script
function(check_mathfunc target func lib RESULT_VAR)
set(args1 "f, g")
set(args2 "f")
if ("${target}" MATCHES "atan2f|copysign|hypot|ldexpf|powf")
set(TEST_CODE "#include <math.h>\nfloat foo(float f, float g) { return ${func}(${args1}); }\nint main(void){ return (int) foo; }")
else()
set(TEST_CODE "#include <math.h>\nfloat foo(float f, float g) { return ${func}(${args2}); }\nint main(void){ return (int) foo; }")
endif()
check_ld(${target} "${TEST_CODE}" "${lib}" ${RESULT_VAR})
if (${RESULT_VAR} EQUAL 1)
set(${RESULT_VAR} "${${RESULT_VAR}}" PARENT_SCOPE)
endif()
endfunction()
# Rewrite of ffmpeg's check_func_headers function at line 1116 of configure script
function(check_func_headers target headers funcs lib RESULT_VAR)
# Check whether more than 1 header file was passed as an argument
list(LENGTH headers len)
if (len GREATER 1)
foreach(header IN LISTS headers)
string(APPEND HEADERS_STRING "#include ${header}\n")
endforeach()
else()
set(HEADERS_STRING "#include ${headers}")
endif()
# Check whether more than 1 function to test was passed as an argument
list(LENGTH funcs len)
if (len GREATER 1)
foreach(func IN LISTS funcs)
string(APPEND FUNCS_STRING "long check_${func}(void) { return (long) ${func}; }\n")
endforeach()
else()
set(FUNCS_STRING "long check_${funcs}(void) { return (long) ${funcs}; }\n")
endif()
set(TEST_CODE "${HEADERS_STRING}\n${FUNCS_STRING}\nint main(void) { return 0; }")
check_ld(${target} "${TEST_CODE}" "${lib}" ${RESULT_VAR})
set(${RESULT_VAR} "${${RESULT_VAR}}" PARENT_SCOPE)
# To Do: in ffmpeg's configure script, some results prompt adding additional system libs.
endfunction()
# Rewrite of ffmpeg's check_cpp_condition function at line 1151 of configure script
function(check_cpp_condition target header condition RESULT_VAR)
set(HEADER_STRING "#include <${header}>")
set(CONDITION_STRING "#if !\(${condition})\n#error \"unsatisfied condition: ${condition}\"\n#endif")
set(TEST_CODE "${HEADER_STRING}\n${CONDITION_STRING}\nint x;")
check_cc(${target} "${TEST_CODE}" ${RESULT_VAR})
set(${RESULT_VAR} "${${RESULT_VAR}}" PARENT_SCOPE)
endfunction()
# Rewrite of ffmpeg's check_lib function at line 1164 of configure script
function(check_lib target header func flag RESULT_VAR)
set(HEADER_STRING "${header}")
set(FUNC_STRING "${func}")
set(HEADER_RESULT_VAR "HEADER_${RESULT_VAR}")
check_header("${target}_header" "${HEADER_STRING}" "${flag}" ${HEADER_RESULT_VAR})
if (${HEADER_RESULT_VAR} EQUAL 1)
check_func(${target} "${func}" ${RESULT_VAR} ${flag})
endif()
set(${RESULT_VAR} "${${RESULT_VAR}}" PARENT_SCOPE)
endfunction()
# Rewrite of ffmpeg's check_lib2 function at line 1164 of configure script
function(check_lib2 target headers funcs lib RESULT_VAR)
check_func_headers(${target} "${headers}" "${funcs}" "${lib}" ${RESULT_VAR})
set(${RESULT_VAR} "${${RESULT_VAR}}" PARENT_SCOPE)
endfunction()
# Rewrite of ffmpeg's check_type function at line 1237 of configure script
function(check_type target headers type RESULT_VAR)
check_code(${target} cc "${headers}" "${type} v" ${RESULT_VAR})
set(${RESULT_VAR} "${${RESULT_VAR}}" PARENT_SCOPE)
endfunction()
# Rewrite of ffmpeg's check_struct function at line 1246 of configure script
function(check_struct target headers struct member RESULT_VAR)
set(EXTRA_FLAGS "")
foreach(arg IN ITEMS ${ARGN})
# Append to EXTRA_FLAGS
if(EXTRA_FLAGS STREQUAL "")
set(EXTRA_FLAGS "${arg}")
else()
list(APPEND EXTRA_FLAGS "${arg}")
endif()
endforeach()
check_code(${target} cc "${headers}" "const void *p = &((${struct} *)0)->${member}" ${RESULT_VAR} ${EXTRA_FLAGS})
set(${RESULT_VAR} "${${RESULT_VAR}}" PARENT_SCOPE)
endfunction()
# Rewrite of ffmpeg's check_builtin function at line 1257 of configure script
function(check_builtin target headers builtin RESULT_VAR)
check_code(${target} ld "${headers}" "${builtin}" ${RESULT_VAR})
set(${RESULT_VAR} "${${RESULT_VAR}}" PARENT_SCOPE)
# Note: configure actually invokes check_code with an extra argument!
# Now that we've refactored check_cc to accept optional arguments, we could deal with this here if needed
endfunction()
# convenience function at the end that sets any truthy variables to "1" and any falsy variables to "0"
function(set_disabled_to_zero option)
if(${option})
set(${option} 1 PARENT_SCOPE)
else()
set(${option} 0 PARENT_SCOPE)
endif()
endfunction()
+184
View File
@@ -0,0 +1,184 @@
# libavcodec source files (all platforms)
set(LIBAVCODEC_SOURCE_FILES
${LIBAVCODEC_SRC_DIR}/aac_ac3_parser.c
${LIBAVCODEC_SRC_DIR}/aac_parser.c
${LIBAVCODEC_SRC_DIR}/aacadtsdec.c
${LIBAVCODEC_SRC_DIR}/aacdec.c
${LIBAVCODEC_SRC_DIR}/aacps_float.c
${LIBAVCODEC_SRC_DIR}/aacpsdsp_float.c
${LIBAVCODEC_SRC_DIR}/aacsbr.c
${LIBAVCODEC_SRC_DIR}/aactab.c
${LIBAVCODEC_SRC_DIR}/aandcttab.c
${LIBAVCODEC_SRC_DIR}/allcodecs.c
${LIBAVCODEC_SRC_DIR}/audioconvert.c
${LIBAVCODEC_SRC_DIR}/avdct.c
${LIBAVCODEC_SRC_DIR}/avfft.c
${LIBAVCODEC_SRC_DIR}/avpacket.c
${LIBAVCODEC_SRC_DIR}/avpicture.c
${LIBAVCODEC_SRC_DIR}/bitstream_filter.c
${LIBAVCODEC_SRC_DIR}/bitstream.c
${LIBAVCODEC_SRC_DIR}/blockdsp.c
${LIBAVCODEC_SRC_DIR}/bswapdsp.c
${LIBAVCODEC_SRC_DIR}/cabac.c
${LIBAVCODEC_SRC_DIR}/codec_desc.c
${LIBAVCODEC_SRC_DIR}/d3d11va.c
${LIBAVCODEC_SRC_DIR}/dct.c
${LIBAVCODEC_SRC_DIR}/dct32_fixed.c
${LIBAVCODEC_SRC_DIR}/dct32_float.c
${LIBAVCODEC_SRC_DIR}/dirac.c
${LIBAVCODEC_SRC_DIR}/dv_profile.c
${LIBAVCODEC_SRC_DIR}/error_resilience.c
${LIBAVCODEC_SRC_DIR}/exif.c
${LIBAVCODEC_SRC_DIR}/faandct.c
${LIBAVCODEC_SRC_DIR}/faanidct.c
${LIBAVCODEC_SRC_DIR}/fdctdsp.c
${LIBAVCODEC_SRC_DIR}/fft_fixed_32.c
${LIBAVCODEC_SRC_DIR}/fft_fixed.c
${LIBAVCODEC_SRC_DIR}/fft_float.c
${LIBAVCODEC_SRC_DIR}/fft_init_table.c
${LIBAVCODEC_SRC_DIR}/ffv1.c
${LIBAVCODEC_SRC_DIR}/ffv1enc.c
${LIBAVCODEC_SRC_DIR}/flvdec.c
${LIBAVCODEC_SRC_DIR}/flvenc.c
${LIBAVCODEC_SRC_DIR}/frame_thread_encoder.c
${LIBAVCODEC_SRC_DIR}/golomb.c
${LIBAVCODEC_SRC_DIR}/h263_parser.c
${LIBAVCODEC_SRC_DIR}/h263.c
${LIBAVCODEC_SRC_DIR}/h263data.c
${LIBAVCODEC_SRC_DIR}/h263dec.c
${LIBAVCODEC_SRC_DIR}/h263dsp.c
${LIBAVCODEC_SRC_DIR}/h264_cabac.c
${LIBAVCODEC_SRC_DIR}/h264_cavlc.c
${LIBAVCODEC_SRC_DIR}/h264_direct.c
${LIBAVCODEC_SRC_DIR}/h264_loopfilter.c
${LIBAVCODEC_SRC_DIR}/h264_mb.c
${LIBAVCODEC_SRC_DIR}/h264_parser.c
${LIBAVCODEC_SRC_DIR}/h264_picture.c
${LIBAVCODEC_SRC_DIR}/h264_ps.c
${LIBAVCODEC_SRC_DIR}/h264_refs.c
${LIBAVCODEC_SRC_DIR}/h264_sei.c
${LIBAVCODEC_SRC_DIR}/h264_slice.c
${LIBAVCODEC_SRC_DIR}/h264.c
${LIBAVCODEC_SRC_DIR}/h264chroma.c
${LIBAVCODEC_SRC_DIR}/h264dsp.c
${LIBAVCODEC_SRC_DIR}/h264idct.c
${LIBAVCODEC_SRC_DIR}/h264pred.c
${LIBAVCODEC_SRC_DIR}/h264qpel.c
${LIBAVCODEC_SRC_DIR}/hpeldsp.c
${LIBAVCODEC_SRC_DIR}/huffman.c
${LIBAVCODEC_SRC_DIR}/huffyuv.c
${LIBAVCODEC_SRC_DIR}/huffyuvenc.c
${LIBAVCODEC_SRC_DIR}/huffyuvencdsp.c
${LIBAVCODEC_SRC_DIR}/idctdsp.c
${LIBAVCODEC_SRC_DIR}/imdct15.c
${LIBAVCODEC_SRC_DIR}/imgconvert.c
${LIBAVCODEC_SRC_DIR}/intelh263dec.c
${LIBAVCODEC_SRC_DIR}/ituh263dec.c
${LIBAVCODEC_SRC_DIR}/ituh263enc.c
${LIBAVCODEC_SRC_DIR}/jfdctfst.c
${LIBAVCODEC_SRC_DIR}/jfdctint.c
${LIBAVCODEC_SRC_DIR}/jpegtables.c
${LIBAVCODEC_SRC_DIR}/jrevdct.c
${LIBAVCODEC_SRC_DIR}/kbdwin.c
${LIBAVCODEC_SRC_DIR}/latm_parser.c
${LIBAVCODEC_SRC_DIR}/lossless_videodsp.c
${LIBAVCODEC_SRC_DIR}/mathtables.c
${LIBAVCODEC_SRC_DIR}/mdct_fixed_32.c
${LIBAVCODEC_SRC_DIR}/mdct_fixed.c
${LIBAVCODEC_SRC_DIR}/mdct_float.c
${LIBAVCODEC_SRC_DIR}/me_cmp.c
${LIBAVCODEC_SRC_DIR}/mjpegbdec.c
${LIBAVCODEC_SRC_DIR}/mjpegdec.c
${LIBAVCODEC_SRC_DIR}/motion_est.c
${LIBAVCODEC_SRC_DIR}/mpeg_er.c
${LIBAVCODEC_SRC_DIR}/mpeg12.c
${LIBAVCODEC_SRC_DIR}/mpeg12data.c
${LIBAVCODEC_SRC_DIR}/mpeg12dec.c
${LIBAVCODEC_SRC_DIR}/mpeg4audio.c
${LIBAVCODEC_SRC_DIR}/mpeg4video_parser.c
${LIBAVCODEC_SRC_DIR}/mpeg4video.c
${LIBAVCODEC_SRC_DIR}/mpeg4videodec.c
${LIBAVCODEC_SRC_DIR}/mpeg4videoenc.c
${LIBAVCODEC_SRC_DIR}/mpegaudio_parser.c
${LIBAVCODEC_SRC_DIR}/mpegaudio.c
${LIBAVCODEC_SRC_DIR}/mpegaudiodata.c
${LIBAVCODEC_SRC_DIR}/mpegaudiodec_fixed.c
${LIBAVCODEC_SRC_DIR}/mpegaudiodecheader.c
${LIBAVCODEC_SRC_DIR}/mpegaudiodsp_data.c
${LIBAVCODEC_SRC_DIR}/mpegaudiodsp_fixed.c
${LIBAVCODEC_SRC_DIR}/mpegaudiodsp_float.c
${LIBAVCODEC_SRC_DIR}/mpegaudiodsp.c
${LIBAVCODEC_SRC_DIR}/mpegpicture.c
${LIBAVCODEC_SRC_DIR}/mpegutils.c
${LIBAVCODEC_SRC_DIR}/mpegvideo_enc.c
${LIBAVCODEC_SRC_DIR}/mpegvideo_motion.c
${LIBAVCODEC_SRC_DIR}/mpegvideo_parser.c
${LIBAVCODEC_SRC_DIR}/mpegvideo.c
${LIBAVCODEC_SRC_DIR}/mpegvideodata.c
${LIBAVCODEC_SRC_DIR}/mpegvideodsp.c
${LIBAVCODEC_SRC_DIR}/mpegvideoencdsp.c
${LIBAVCODEC_SRC_DIR}/options.c
${LIBAVCODEC_SRC_DIR}/parser.c
${LIBAVCODEC_SRC_DIR}/pcm.c
${LIBAVCODEC_SRC_DIR}/pixblockdsp.c
${LIBAVCODEC_SRC_DIR}/profiles.c
${LIBAVCODEC_SRC_DIR}/qpeldsp.c
${LIBAVCODEC_SRC_DIR}/qsv_api.c
${LIBAVCODEC_SRC_DIR}/rangecoder.c
${LIBAVCODEC_SRC_DIR}/ratecontrol.c
${LIBAVCODEC_SRC_DIR}/raw.c
${LIBAVCODEC_SRC_DIR}/rdft.c
${LIBAVCODEC_SRC_DIR}/resample.c
${LIBAVCODEC_SRC_DIR}/resample2.c
${LIBAVCODEC_SRC_DIR}/rl.c
${LIBAVCODEC_SRC_DIR}/sbrdsp.c
${LIBAVCODEC_SRC_DIR}/simple_idct.c
${LIBAVCODEC_SRC_DIR}/sinewin_fixed.c
${LIBAVCODEC_SRC_DIR}/sinewin.c
${LIBAVCODEC_SRC_DIR}/startcode.c
${LIBAVCODEC_SRC_DIR}/tiff_common.c
${LIBAVCODEC_SRC_DIR}/utils.c
${LIBAVCODEC_SRC_DIR}/videodsp.c
${LIBAVCODEC_SRC_DIR}/vorbis_parser.c
${LIBAVCODEC_SRC_DIR}/xiph.c
${LIBAVCODEC_SRC_DIR}/xvididct.c
)
# includes to ship with libavcodec
set(LIBAVCODEC_HEADERS
${LIBAVCODEC_SRC_DIR}/avcodec.h
${LIBAVCODEC_SRC_DIR}/avdct.h
${LIBAVCODEC_SRC_DIR}/avfft.h
${LIBAVCODEC_SRC_DIR}/dv_profile.h
${LIBAVCODEC_SRC_DIR}/d3d11va.h
${LIBAVCODEC_SRC_DIR}/dirac.h
${LIBAVCODEC_SRC_DIR}/dxva2.h
${LIBAVCODEC_SRC_DIR}/qsv.h
${LIBAVCODEC_SRC_DIR}/vaapi.h
${LIBAVCODEC_SRC_DIR}/vda.h
${LIBAVCODEC_SRC_DIR}/vdpau.h
${LIBAVCODEC_SRC_DIR}/version.h
${LIBAVCODEC_SRC_DIR}/videotoolbox.h
${LIBAVCODEC_SRC_DIR}/vorbis_parser.h
${LIBAVCODEC_SRC_DIR}/xvmc.h
)
# OS and configure option/check specific additional sources
if (WIN32)
list(APPEND LIBAVCODEC_SOURCE_FILES ${LIBAVCODEC_SRC_DIR}/file_open.c)
if (CONFIG_DXVA2 AND HAVE_DXVA2_LIB)
list(APPEND LIBAVCODEC_SOURCE_FILES ${LIBAVCODEC_SRC_DIR}/dxva2.c)
endif()
endif()
if (Threads_FOUND)
list(APPEND LIBAVCODEC_SOURCE_FILES ${LIBAVCODEC_SRC_DIR}/pthread.c)
list(APPEND LIBAVCODEC_SOURCE_FILES ${LIBAVCODEC_SRC_DIR}/pthread_slice.c)
list(APPEND LIBAVCODEC_SOURCE_FILES ${LIBAVCODEC_SRC_DIR}/pthread_frame.c)
endif()
# Experimental addition to troubleshoot stubborn builds that inject ARCH_X86
if (ARCH_X86)
list(APPEND LIBAVCODEC_SOURCE_FILES ${LIBAVCODEC_SRC_DIR}/x86/lossless_videodsp_init.c)
endif()
+51
View File
@@ -0,0 +1,51 @@
# libavformat source files (all platforms)
set(LIBAVFORMAT_SOURCE_FILES
${LIBAVFORMAT_SRC_DIR}/aacdec.c
${LIBAVFORMAT_SRC_DIR}/allformats.c
${LIBAVFORMAT_SRC_DIR}/apetag.c
${LIBAVFORMAT_SRC_DIR}/avidec.c
${LIBAVFORMAT_SRC_DIR}/avienc.c
${LIBAVFORMAT_SRC_DIR}/avio.c
${LIBAVFORMAT_SRC_DIR}/aviobuf.c
${LIBAVFORMAT_SRC_DIR}/avlanguage.c
${LIBAVFORMAT_SRC_DIR}/cutils.c
${LIBAVFORMAT_SRC_DIR}/dump.c
${LIBAVFORMAT_SRC_DIR}/file.c
${LIBAVFORMAT_SRC_DIR}/format.c
${LIBAVFORMAT_SRC_DIR}/h263dec.c
${LIBAVFORMAT_SRC_DIR}/h264dec.c
${LIBAVFORMAT_SRC_DIR}/id3v1.c
${LIBAVFORMAT_SRC_DIR}/id3v2.c
${LIBAVFORMAT_SRC_DIR}/img2.c
${LIBAVFORMAT_SRC_DIR}/isom.c
${LIBAVFORMAT_SRC_DIR}/m4vdec.c
${LIBAVFORMAT_SRC_DIR}/metadata.c
${LIBAVFORMAT_SRC_DIR}/mp3dec.c
${LIBAVFORMAT_SRC_DIR}/mpeg.c
${LIBAVFORMAT_SRC_DIR}/mpegtsenc.c
${LIBAVFORMAT_SRC_DIR}/mpegvideodec.c
${LIBAVFORMAT_SRC_DIR}/mux.c
${LIBAVFORMAT_SRC_DIR}/oma.c
${LIBAVFORMAT_SRC_DIR}/omadec.c
${LIBAVFORMAT_SRC_DIR}/options.c
${LIBAVFORMAT_SRC_DIR}/os_support.c
${LIBAVFORMAT_SRC_DIR}/pcm.c
${LIBAVFORMAT_SRC_DIR}/pcmdec.c
${LIBAVFORMAT_SRC_DIR}/pmpdec.c
${LIBAVFORMAT_SRC_DIR}/qtpalette.c
${LIBAVFORMAT_SRC_DIR}/rawdec.c
${LIBAVFORMAT_SRC_DIR}/replaygain.c
${LIBAVFORMAT_SRC_DIR}/riff.c
${LIBAVFORMAT_SRC_DIR}/riffdec.c
${LIBAVFORMAT_SRC_DIR}/riffenc.c
${LIBAVFORMAT_SRC_DIR}/sdp.c
${LIBAVFORMAT_SRC_DIR}/url.c
${LIBAVFORMAT_SRC_DIR}/utils.c
${LIBAVFORMAT_SRC_DIR}/wavdec.c
)
set(LIBAVFORMAT_HEADERS
${LIBAVFORMAT_SRC_DIR}/avformat.h
${LIBAVFORMAT_SRC_DIR}/avio.h
${LIBAVFORMAT_SRC_DIR}/version.h
)
+141
View File
@@ -0,0 +1,141 @@
# libavutil source files (all platforms)
set(LIBAVUTIL_SOURCE_FILES
${LIBAVUTIL_SRC_DIR}/adler32.c
${LIBAVUTIL_SRC_DIR}/aes_ctr.c
${LIBAVUTIL_SRC_DIR}/aes.c
${LIBAVUTIL_SRC_DIR}/audio_fifo.c
${LIBAVUTIL_SRC_DIR}/avstring.c
${LIBAVUTIL_SRC_DIR}/base64.c
${LIBAVUTIL_SRC_DIR}/blowfish.c
${LIBAVUTIL_SRC_DIR}/bprint.c
${LIBAVUTIL_SRC_DIR}/buffer.c
${LIBAVUTIL_SRC_DIR}/camellia.c
${LIBAVUTIL_SRC_DIR}/cast5.c
${LIBAVUTIL_SRC_DIR}/channel_layout.c
${LIBAVUTIL_SRC_DIR}/color_utils.c
${LIBAVUTIL_SRC_DIR}/cpu.c
${LIBAVUTIL_SRC_DIR}/crc.c
${LIBAVUTIL_SRC_DIR}/des.c
${LIBAVUTIL_SRC_DIR}/dict.c
${LIBAVUTIL_SRC_DIR}/display.c
${LIBAVUTIL_SRC_DIR}/downmix_info.c
${LIBAVUTIL_SRC_DIR}/error.c
${LIBAVUTIL_SRC_DIR}/eval.c
${LIBAVUTIL_SRC_DIR}/fifo.c
${LIBAVUTIL_SRC_DIR}/file_open.c
${LIBAVUTIL_SRC_DIR}/file.c
${LIBAVUTIL_SRC_DIR}/fixed_dsp.c
${LIBAVUTIL_SRC_DIR}/float_dsp.c
${LIBAVUTIL_SRC_DIR}/frame.c
${LIBAVUTIL_SRC_DIR}/hash.c
${LIBAVUTIL_SRC_DIR}/hmac.c
${LIBAVUTIL_SRC_DIR}/imgutils.c
${LIBAVUTIL_SRC_DIR}/integer.c
${LIBAVUTIL_SRC_DIR}/intmath.c
${LIBAVUTIL_SRC_DIR}/lfg.c
${LIBAVUTIL_SRC_DIR}/lls.c
${LIBAVUTIL_SRC_DIR}/log.c
${LIBAVUTIL_SRC_DIR}/log2_tab.c
${LIBAVUTIL_SRC_DIR}/mastering_display_metadata.c
${LIBAVUTIL_SRC_DIR}/mathematics.c
${LIBAVUTIL_SRC_DIR}/md5.c
${LIBAVUTIL_SRC_DIR}/mem.c
${LIBAVUTIL_SRC_DIR}/murmur3.c
${LIBAVUTIL_SRC_DIR}/opt.c
${LIBAVUTIL_SRC_DIR}/parseutils.c
${LIBAVUTIL_SRC_DIR}/pixdesc.c
${LIBAVUTIL_SRC_DIR}/pixelutils.c
${LIBAVUTIL_SRC_DIR}/random_seed.c
${LIBAVUTIL_SRC_DIR}/rational.c
${LIBAVUTIL_SRC_DIR}/rc4.c
${LIBAVUTIL_SRC_DIR}/reverse.c
${LIBAVUTIL_SRC_DIR}/ripemd.c
${LIBAVUTIL_SRC_DIR}/samplefmt.c
${LIBAVUTIL_SRC_DIR}/sha.c
${LIBAVUTIL_SRC_DIR}/sha512.c
${LIBAVUTIL_SRC_DIR}/stereo3d.c
${LIBAVUTIL_SRC_DIR}/tea.c
${LIBAVUTIL_SRC_DIR}/threadmessage.c
${LIBAVUTIL_SRC_DIR}/time.c
${LIBAVUTIL_SRC_DIR}/timecode.c
${LIBAVUTIL_SRC_DIR}/tree.c
${LIBAVUTIL_SRC_DIR}/twofish.c
${LIBAVUTIL_SRC_DIR}/utils.c
${LIBAVUTIL_SRC_DIR}/xga_font_data.c
${LIBAVUTIL_SRC_DIR}/xtea.c
)
set(LIBAVUTIL_HEADERS
${LIBAVUTIL_SRC_DIR}/adler32.h
${LIBAVUTIL_SRC_DIR}/aes.h
${LIBAVUTIL_SRC_DIR}/aes_ctr.h
${LIBAVUTIL_SRC_DIR}/attributes.h
${LIBAVUTIL_SRC_DIR}/audio_fifo.h
${LIBAVUTIL_SRC_DIR}/avassert.h
${LIBAVUTIL_SRC_DIR}/avstring.h
${LIBAVUTIL_SRC_DIR}/avutil.h
${LIBAVUTIL_SRC_DIR}/base64.h
${LIBAVUTIL_SRC_DIR}/blowfish.h
${LIBAVUTIL_SRC_DIR}/bprint.h
${LIBAVUTIL_SRC_DIR}/bswap.h
${LIBAVUTIL_SRC_DIR}/buffer.h
${LIBAVUTIL_SRC_DIR}/cast5.h
${LIBAVUTIL_SRC_DIR}/camellia.h
${LIBAVUTIL_SRC_DIR}/channel_layout.h
${LIBAVUTIL_SRC_DIR}/common.h
${LIBAVUTIL_SRC_DIR}/cpu.h
${LIBAVUTIL_SRC_DIR}/crc.h
${LIBAVUTIL_SRC_DIR}/des.h
${LIBAVUTIL_SRC_DIR}/display.h
${LIBAVUTIL_SRC_DIR}/downmix_info.h
${LIBAVUTIL_SRC_DIR}/error.h
${LIBAVUTIL_SRC_DIR}/eval.h
${LIBAVUTIL_SRC_DIR}/fifo.h
${LIBAVUTIL_SRC_DIR}/file.h
${LIBAVUTIL_SRC_DIR}/frame.h
${LIBAVUTIL_SRC_DIR}/hash.h
${LIBAVUTIL_SRC_DIR}/hmac.h
${LIBAVUTIL_SRC_DIR}/imgutils.h
${LIBAVUTIL_SRC_DIR}/intfloat.h
${LIBAVUTIL_SRC_DIR}/intreadwrite.h
${LIBAVUTIL_SRC_DIR}/lfg.h
${LIBAVUTIL_SRC_DIR}/log.h
${LIBAVUTIL_SRC_DIR}/macros.h
${LIBAVUTIL_SRC_DIR}/mathematics.h
${LIBAVUTIL_SRC_DIR}/mastering_display_metadata.h
${LIBAVUTIL_SRC_DIR}/md5.h
${LIBAVUTIL_SRC_DIR}/mem.h
${LIBAVUTIL_SRC_DIR}/motion_vector.h
${LIBAVUTIL_SRC_DIR}/murmur3.h
${LIBAVUTIL_SRC_DIR}/dict.h
${LIBAVUTIL_SRC_DIR}/opt.h
${LIBAVUTIL_SRC_DIR}/parseutils.h
${LIBAVUTIL_SRC_DIR}/pixdesc.h
${LIBAVUTIL_SRC_DIR}/pixelutils.h
${LIBAVUTIL_SRC_DIR}/pixfmt.h
${LIBAVUTIL_SRC_DIR}/random_seed.h
${LIBAVUTIL_SRC_DIR}/rc4.h
${LIBAVUTIL_SRC_DIR}/replaygain.h
${LIBAVUTIL_SRC_DIR}/rational.h
${LIBAVUTIL_SRC_DIR}/ripemd.h
${LIBAVUTIL_SRC_DIR}/samplefmt.h
${LIBAVUTIL_SRC_DIR}/sha.h
${LIBAVUTIL_SRC_DIR}/sha512.h
${LIBAVUTIL_SRC_DIR}/stereo3d.h
${LIBAVUTIL_SRC_DIR}/threadmessage.h
${LIBAVUTIL_SRC_DIR}/time.h
${LIBAVUTIL_SRC_DIR}/timecode.h
${LIBAVUTIL_SRC_DIR}/timestamp.h
${LIBAVUTIL_SRC_DIR}/tree.h
${LIBAVUTIL_SRC_DIR}/twofish.h
${LIBAVUTIL_SRC_DIR}/version.h
${LIBAVUTIL_SRC_DIR}/xtea.h
${LIBAVUTIL_SRC_DIR}/tea.h
${CMAKE_CURRENT_BINARY_DIR}/libavutil/ffversion.h
${CMAKE_CURRENT_BINARY_DIR}/libavutil/avconfig.h
)
# Experimental addition to troubleshoot stubborn builds that inject ARCH_X86
if (ARCH_X86)
list(APPEND LIBAVUTIL_SOURCE_FILES ${LIBAVUTIL_SRC_DIR}/x86/cpu.c)
endif()
+22
View File
@@ -0,0 +1,22 @@
# libswresample source files (all platforms)
set(LIBSWRESAMPLE_SOURCE_FILES
${LIBSWRESAMPLE_SRC_DIR}/swresample.h
${LIBSWRESAMPLE_SRC_DIR}/audioconvert.c
${LIBSWRESAMPLE_SRC_DIR}/dither.c
${LIBSWRESAMPLE_SRC_DIR}/options.c
${LIBSWRESAMPLE_SRC_DIR}/rematrix.c
${LIBSWRESAMPLE_SRC_DIR}/resample_dsp.c
${LIBSWRESAMPLE_SRC_DIR}/resample.c
${LIBSWRESAMPLE_SRC_DIR}/swresample_frame.c
${LIBSWRESAMPLE_SRC_DIR}/swresample.c
)
set(LIBSWRESAMPLE_HEADERS
${LIBSWRESAMPLE_SRC_DIR}/swresample.h
${LIBSWRESAMPLE_SRC_DIR}/version.h
)
# Experimental addition to troubleshoot stubborn builds that inject ARCH_X86
if (ARCH_X86)
list(APPEND LIBSWRESAMPLE_SOURCE_FILES ${LIBSWRESAMPLE_SRC_DIR}/x86/resample_init.c)
endif()
+22
View File
@@ -0,0 +1,22 @@
# libswscale source files (all platforms)
set(LIBSWSCALE_SOURCE_FILES
${LIBSWSCALE_SRC_DIR}/alphablend.c
${LIBSWSCALE_SRC_DIR}/gamma.c
${LIBSWSCALE_SRC_DIR}/hscale_fast_bilinear.c
${LIBSWSCALE_SRC_DIR}/hscale.c
${LIBSWSCALE_SRC_DIR}/input.c
${LIBSWSCALE_SRC_DIR}/options.c
${LIBSWSCALE_SRC_DIR}/output.c
${LIBSWSCALE_SRC_DIR}/rgb2rgb.c
${LIBSWSCALE_SRC_DIR}/slice.c
${LIBSWSCALE_SRC_DIR}/swscale_unscaled.c
${LIBSWSCALE_SRC_DIR}/swscale.c
${LIBSWSCALE_SRC_DIR}/utils.c
${LIBSWSCALE_SRC_DIR}/vscale.c
${LIBSWSCALE_SRC_DIR}/yuv2rgb.c
)
set(LIBSWSCALE_HEADERS
${LIBSWSCALE_SRC_DIR}/swscale.h
${LIBSWSCALE_SRC_DIR}/version.h
)