换ffmpeg

This commit is contained in:
2026-08-23 12:58:44 +08:00
parent b3af1c1b04
commit 73a3152733
235 changed files with 301216 additions and 741 deletions
+22 -11
View File
@@ -1,5 +1,7 @@
include("${CMAKE_CURRENT_LIST_DIR}/third_party/asio/main.cmake")
set(Aethera_Web_dependencies global::drogon global::spdlog global::pfr)
include("${CMAKE_CURRENT_LIST_DIR}/cmake/rely.cmake")
include("${CMAKE_CURRENT_LIST_DIR}/third_party/ffmpeg.cmake")
set(Aethera_Web_dependencies aethera_kernel::libdatachannel global::drogon global::spdlog global::pfr)
rcl_add_dependency_action_targets(Aethera_Web_env ${Aethera_Web_dependencies})
set_target_properties(Aethera_Web_env PROPERTIES FOLDER Aethera_Web)
function(renderive_configure_frontend)
@@ -77,21 +79,19 @@ function(renderive_configure_frontend)
COMMENT "Synchronizing Aethera Gallery frontend assets"
VERBATIM)
endfunction()
function(renderive_find_web_dependencies)
if (POLICY CMP0144)
cmake_policy(SET CMP0144 NEW)
endif ()
rcl_load_dependency_environment(${Aethera_Web_dependencies})
find_package(Drogon CONFIG REQUIRED)
find_package(spdlog CONFIG REQUIRED)
endfunction()
renderive_configure_frontend()
library_get_missing_with_rely(Aethera_Web_dependencies_missing ${Aethera_Web_dependencies})
if (Aethera_Web_dependencies_missing)
rcl_log_append(${CMAKE_CURRENT_LIST_LINE} "[FATAL_ERROR] Aethera_Web dependencies\n${Aethera_Web_dependencies_missing}\n are not installed. Build Aethera_Web_env first")
return()
endif ()
renderive_find_web_dependencies()
if (POLICY CMP0144)
cmake_policy(SET CMP0144 NEW)
endif ()
rcl_load_dependency_environment(${Aethera_Web_dependencies})
find_package(Drogon CONFIG REQUIRED)
find_package(spdlog CONFIG REQUIRED)
find_package(libdatachannel REQUIRED)
if (NOT TARGET Aethera_render_2D)
rcl_log_append(${CMAKE_CURRENT_LIST_LINE} "[FATAL_ERROR] Aethera_Web requires Aethera_render_2D")
return()
@@ -129,8 +129,19 @@ target_link_libraries(Aethera_Web_Server PRIVATE
Drogon::Drogon
spdlog::spdlog
structive::property_core
asio_object)
asio_object
LibDataChannel::LibDataChannel
Aethera::FFmpeg
)
add_dependencies(Aethera_Web_Server Aethera_Web_Assets)
add_custom_command(TARGET Aethera_Web_Server POST_BUILD
COMMAND "${CMAKE_COMMAND}" -E copy_if_different
"$<TARGET_FILE:Aethera_FFmpeg_avcodec>"
"$<TARGET_FILE:Aethera_FFmpeg_avutil>"
"$<TARGET_FILE:Aethera_FFmpeg_swscale>"
"$<TARGET_FILE_DIR:Aethera_Web_Server>"
COMMENT "Deploying FFmpeg runtime for Aethera WebRTC video"
VERBATIM)
if (MSVC)
target_compile_options(Aethera_Web_Server PRIVATE /utf-8 /bigobj)
endif ()