cmake: add support for triplet x64-mingw-static (#15)
Some checks failed
C/C++ CI / ${{ matrix.build }} ${{ matrix.arch }} (arm64, linux, , ubuntu-latest, linux-release, /usr/local/share/vcpkg) (push) Failing after 0s
C/C++ CI / ${{ matrix.build }} ${{ matrix.arch }} (x64, linux, , ubuntu-latest, linux-release, /usr/local/share/vcpkg) (push) Failing after 0s
C/C++ CI / ${{ matrix.build }} ${{ matrix.arch }} (arm64, macos, , macos-latest, osx-release, /Users/runner/vcpkg) (push) Has been cancelled
C/C++ CI / ${{ matrix.build }} ${{ matrix.arch }} (arm64, windows, --overlay-triplets=./triplets, windows-latest, win-llvm-static-release, C:\vcpkg) (push) Has been cancelled
C/C++ CI / ${{ matrix.build }} ${{ matrix.arch }} (universal, macos, --overlay-triplets=./triplets, macos-latest, osx-release, /Users/runner/vcpkg) (push) Has been cancelled
C/C++ CI / ${{ matrix.build }} ${{ matrix.arch }} (x64, macos, , macos-latest, osx-release, /Users/runner/vcpkg) (push) Has been cancelled
C/C++ CI / ${{ matrix.build }} ${{ matrix.arch }} (x64, mingw, , windows-latest, mingw-static, C:\vcpkg) (push) Has been cancelled
C/C++ CI / ${{ matrix.build }} ${{ matrix.arch }} (x64, windows, --overlay-triplets=./triplets, windows-latest, win-llvm-static-release, C:\vcpkg) (push) Has been cancelled
C/C++ CI / create-release (push) Has been cancelled

* cmake: add support for triplet x64-mingw-static

* rename build to mingw
This commit is contained in:
oltolm 2024-09-16 20:52:52 +02:00 committed by GitHub
parent 29123c3a10
commit 434b71f3c1
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
2 changed files with 30 additions and 2 deletions

View File

@ -1,3 +1,4 @@
# yaml-language-server: $schema=https://json.schemastore.org/github-workflow.json
name: C/C++ CI
on: [push]
@ -24,6 +25,12 @@ jobs:
triplet: win-llvm-static-release
vcpkg-root: C:\vcpkg
extra-args: --overlay-triplets=./triplets
- build: mingw
os: windows-latest
triplet: mingw-static
vcpkg-root: C:\vcpkg
arch: x64
extra-args: ""
- build: macos
os: macos-latest
triplet: osx-release
@ -37,6 +44,17 @@ jobs:
extra-args: --overlay-triplets=./triplets
steps:
- run: git config --global core.autocrlf input
- uses: msys2/setup-msys2@v2
id: msys2
with:
msystem: CLANG64
update: true
pacboy: >-
toolchain:p
cmake:p
ninja:p
if: matrix.triplet == 'mingw-static'
- uses: actions/checkout@v4
- name: Set up build environment (macos-latest)
@ -65,7 +83,15 @@ jobs:
- name: Build ffmpeg
run: |
vcpkg ${{ matrix.extra-args }} install ffmpeg[avcodec,avfilter,avdevice,avformat,swresample,swscale]:${{ matrix.arch }}-${{ matrix.triplet }}
vcpkg ${{ matrix.extra-args }} install ffmpeg[avcodec,avfilter,avdevice,avformat,swresample,swscale]:${{ matrix.arch }}-${{ matrix.triplet }}
if: matrix.triplet != 'mingw-static'
- name: Build ffmpeg (x64-mingw-static)
shell: msys2 {0}
run: |
export PATH=$(cygpath '${{ matrix.vcpkg-root }}'):$PATH
vcpkg ${{ matrix.extra-args }} install ffmpeg[avcodec,avfilter,avdevice,avformat,swresample,swscale]:${{ matrix.arch }}-${{ matrix.triplet }}
if: matrix.triplet == 'mingw-static'
- uses: actions/upload-artifact@v4
with:

View File

@ -13,6 +13,8 @@ elseif (APPLE)
set(FFMPEG_PREBUILTS_NAME "ffmpeg-macos")
elseif (UNIX)
set(FFMPEG_PREBUILTS_NAME "ffmpeg-linux")
elseif (MINGW)
set(FFMPEG_PREBUILTS_NAME "ffmpeg-mingw")
else ()
message(FATAL_ERROR "Unsupported OS.")
endif ()
@ -76,4 +78,4 @@ target_link_libraries(${FFMPEG_CORE_NAME} INTERFACE
"${CMAKE_BINARY_DIR}/external/ffmpeg/lib/${LIB_PREFIX}swscale.${LIB_EXT}"
"${CMAKE_BINARY_DIR}/external/ffmpeg/lib/${LIB_PREFIX}avutil.${LIB_EXT}"
"${CMAKE_BINARY_DIR}/external/ffmpeg/lib/${LIB_PREFIX}avfilter.${LIB_EXT}"
"${CMAKE_BINARY_DIR}/external/ffmpeg/lib/${LIB_PREFIX}swresample.${LIB_EXT}")
"${CMAKE_BINARY_DIR}/external/ffmpeg/lib/${LIB_PREFIX}swresample.${LIB_EXT}")