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

8
.github/BUILDING.md vendored
View File

@ -2,22 +2,20 @@
### The dependencies for Debian-like distributions.
#### git is only needed for Ubuntu 22.04
```
sudo apt install build-essential cmake libunwind-dev libglfw3-dev libvulkan-dev vulkan-validationlayers-dev libsox-dev git libasound2-dev
sudo apt install build-essential cmake libunwind-dev libglfw3-dev libvulkan-dev vulkan-validationlayers-dev libsox-dev git libasound2-dev nasm g++-14
```
### The dependencies for Fedora distributions:
```
sudo dnf install cmake libunwind-devel glfw-devel vulkan-devel vulkan-validation-layers-devel gcc-c++ gcc sox-devel alsa-lib-devel
sudo dnf install cmake libunwind-devel glfw-devel vulkan-devel vulkan-validation-layers-devel gcc-c++ gcc sox-devel alsa-lib-devel nasm
```
### The dependencies for Arch distributions:
```
sudo pacman -S libunwind glfw-x11 vulkan-devel sox git cmake alsa-lib
sudo pacman -S libunwind glfw-x11 vulkan-devel sox git cmake alsa-lib nasm
```
## Cloning the Repo

View File

@ -29,7 +29,7 @@ jobs:
libsox-dev
echo "deb http://azure.archive.ubuntu.com/ubuntu noble main universe" | sudo tee /etc/apt/sources.list
sudo apt update
sudo apt install g++-14 ninja-build libasound2-dev
sudo apt install g++-14 ninja-build libasound2-dev nasm
VULKANVER=1.3.290
curl -sSfLo Vulkan-Headers.tar.gz https://github.com/KhronosGroup/Vulkan-Headers/archive/v${VULKANVER}.tar.gz
tar -xf Vulkan-Headers*.tar.gz

6
.gitmodules vendored
View File

@ -16,3 +16,9 @@
[submodule "3rdparty/json"]
path = 3rdparty/json
url = ../../nlohmann/json.git
[submodule "3rdparty/FFmpeg"]
path = 3rdparty/FFmpeg
url = ../../FFmpeg/FFmpeg.git
[submodule "3rdparty/LibAtrac9"]
path = 3rdparty/LibAtrac9
url = ../../RPCSX/LibAtrac9.git

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

View File

@ -75,6 +75,9 @@ add_subdirectory(core)
target_include_directories(rpcsx PUBLIC ${CMAKE_CURRENT_SOURCE_DIR})
target_link_libraries(rpcsx
PUBLIC
ffmpeg::avcodec
ffmpeg::swresample
ffmpeg::avutil
rpcsx-gpu
orbis::kernel
rx