add ffmpeg and libatrac9 submodules

This commit is contained in:
DH 2024-10-13 16:32:12 +03:00
parent 325708a4e2
commit 444fc1a387
7 changed files with 53 additions and 6 deletions

View file

@ -31,3 +31,41 @@ if(NOT nlohmann_json_FOUND)
add_subdirectory(json)
endif()
add_subdirectory(LibAtrac9)
set(FFMPEG_PATH ${CMAKE_CURRENT_SOURCE_DIR}/FFmpeg)
add_custom_command(
OUTPUT ${FFMPEG_PATH}/config.h
COMMAND ./configure
COMMENT "Configuring FFmpeg..."
WORKING_DIRECTORY ${FFMPEG_PATH}
)
add_custom_target(ffmpeg-configure DEPENDS ${FFMPEG_PATH}/config.h)
add_custom_target(ffmpeg-build)
add_custom_command(
TARGET ffmpeg-build
COMMAND $(MAKE) -C ${FFMPEG_PATH}
COMMENT "Building FFmpeg..."
DEPENDS ffmpeg-configure
WORKING_DIRECTORY ${FFMPEG_PATH}
)
add_library(ffmpeg-core INTERFACE)
add_dependencies(ffmpeg-core ffmpeg-build)
function(import_ffmpeg_library name)
add_library(ffmpeg::${name} STATIC IMPORTED GLOBAL)
set_property(TARGET ffmpeg::${name} PROPERTY IMPORTED_LOCATION "${FFMPEG_PATH}/lib${name}/lib${name}.a")
set_property(TARGET ffmpeg::${name} PROPERTY INTERFACE_INCLUDE_DIRECTORIES "${FFMPEG_PATH}")
endfunction()
import_ffmpeg_library(avcodec)
import_ffmpeg_library(avformat)
import_ffmpeg_library(avfilter)
import_ffmpeg_library(avdevice)
import_ffmpeg_library(avutil)
import_ffmpeg_library(swscale)
import_ffmpeg_library(swresample)
import_ffmpeg_library(postproc)

1
3rdparty/FFmpeg vendored Submodule

@ -0,0 +1 @@
Subproject commit f5f590b1e72cbd1da257d87d1adf1e9db3b9e2a9

1
3rdparty/LibAtrac9 vendored Submodule

@ -0,0 +1 @@
Subproject commit 55a4e0c17a6148c0208d2c9641352a605f788749