Skip to content

Commit

Permalink
Compile FFmpeg backend.
Browse files Browse the repository at this point in the history
  • Loading branch information
MikuAuahDark committed Jun 12, 2024
1 parent a0b7a34 commit 58c3af7
Show file tree
Hide file tree
Showing 2 changed files with 28 additions and 2 deletions.
29 changes: 27 additions & 2 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,13 +13,38 @@ jobs:
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Get FFmpeg
uses: robinraju/release-downloader@v1
with:
repository: GyanD/codexffmpeg
tag: "6.0"
fileName: ffmpeg-6.0-full_build-shared.7z
tarBall: false
zipBall: false
- name: Extract FFmpeg
run: 7z x ffmpeg-6.0-full_build-shared.7z
- name: Configure
run: cmake -Bbuild -S. -A ${{ matrix.PLATFORM }} --install-prefix %CD%\install -DBUILD_SHARED_LIBS=1
run: cmake -Bbuild -S. -A ${{ matrix.PLATFORM }} --install-prefix %CD%\install -DBUILD_SHARED_LIBS=1 -DFFMPEG_DIR=%CD%\ffmpeg-6.0-full_build-shared
- name: Install
run: cmake --build build --config RelWithDebInfo --target install
run: cmake --build build --config RelWithDebInfo --target install -j%NUMBER_OF_PROCESSORS%
- name: Artifact
uses: actions/upload-artifact@v4
with:
name: nav-dll-${{ matrix.PLATFORM }}
path: install/
compression-level: 9
Ubuntu:
runs-on: ubuntu-24.04
steps:
- name: Install FFmpeg Development Libraries
run: sudo apt-get install libavcodec-dev libavformat-dev libavutil-dev libswresample-dev libswscale-dev
- name: Configure
run: cmake -Bbuild -S. -DCMAKE_BUILD_TYPE=RelWithDebInfo --install-prefix $PWD/install -DBUILD_SHARED_LIBS=1
- name: Install
run: cmake --build build --target install -j$(nproc)
- name: Artifact
uses: actions/upload-artifact@v4
with:
name: nav-so-x86_64
path: install/
compression-level: 9
1 change: 1 addition & 0 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -55,6 +55,7 @@ else()
endif()

if(FFMPEG_FOUND OR FFMPEG_INCLUDE_DIRS)
message(STATUS "Using FFmpeg include directory: ${FFMPEG_INCLUDE_DIRS}")
target_include_directories(nav PRIVATE ${FFMPEG_INCLUDE_DIRS})
endif()

Expand Down

0 comments on commit 58c3af7

Please sign in to comment.