Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 7 additions & 1 deletion .github/workflows/build-toolchain.yml
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,11 @@ on:
default: false
type: boolean
description: "Build extras"
ffmpeg:
required: false
default: false
type: boolean
description: "Build with FFMPEG support"

jobs:
build:
Expand Down Expand Up @@ -154,7 +159,7 @@ jobs:
"VCPKG_OVERLAY_TRIPLETS=${{ github.workspace }}\triplets" >> $env:GITHUB_ENV
"VCPKG_INSTALL_OPTIONS=--x-abi-tools-use-exact-versions" >> $env:GITHUB_ENV

- name: Configure ${{ inputs.game }} with CMake Using ${{ inputs.preset }}${{ inputs.tools && '+t' || '' }}${{ inputs.extras && '+e' || '' }} Preset
- name: Configure ${{ inputs.game }} with CMake Using ${{ inputs.preset }}${{ inputs.tools && '+t' || '' }}${{ inputs.extras && '+e' || '' }}${{ inputs.ffmpeg && '+ffmpeg'}} Preset
shell: pwsh
run: |
$buildFlags = @(
Expand All @@ -167,6 +172,7 @@ jobs:
$buildFlags += "-DRTS_BUILD_${gamePrefix}_TOOLS=${{ inputs.tools && 'ON' || 'OFF' }}"
$buildFlags += "-DRTS_BUILD_CORE_EXTRAS=${{ inputs.extras && 'ON' || 'OFF' }}"
$buildFlags += "-DRTS_BUILD_${gamePrefix}_EXTRAS=${{ inputs.extras && 'ON' || 'OFF' }}"
$buildFlags += "-DRTS_BUILD_OPTION_FFMPEG=${{ inputs.ffmpeg && 'ON' || 'OFF' }}"

Write-Host "Build flags: $($buildFlags -join ' | ')"
cmake --preset ${{ inputs.preset }} $buildFlags
Expand Down
4 changes: 4 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -147,6 +147,10 @@ jobs:
#- preset: "win32-vcpkg"
# tools: true
# extras: true
#- preset: "win32-vcpkg"
# tools: true
# extras: true
# ffmpeg: true
#- preset: "win32-vcpkg-profile"
# tools: true
# extras: true
Expand Down
6 changes: 6 additions & 0 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,12 @@ if (CMAKE_BINARY_DIR STREQUAL CMAKE_SOURCE_DIR)
message(FATAL_ERROR "Building in-source is not supported! Create a build dir and remove ${CMAKE_SOURCE_DIR}/CMakeCache.txt")
endif()

# Define VCPKG feature before `project` block
option(RTS_BUILD_OPTION_FFMPEG "Enable FFmpeg support" OFF)
if(RTS_BUILD_OPTION_FFMPEG)
list(APPEND VCPKG_MANIFEST_FEATURES "ffmpeg")
endif()

# Top level project, doesn't really affect anything.
project(genzh LANGUAGES C CXX)

Expand Down
1 change: 0 additions & 1 deletion cmake/config-build.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,6 @@ option(RTS_BUILD_OPTION_PROFILE_TRACY "Build code with Tracy profiling enabled."
option(RTS_BUILD_OPTION_DEBUG "Build code with the \"Debug\" configuration." OFF)
option(RTS_BUILD_OPTION_ASAN "Build code with Address Sanitizer." OFF)
option(RTS_BUILD_OPTION_VC6_FULL_DEBUG "Build VC6 with full debug info." OFF)
option(RTS_BUILD_OPTION_FFMPEG "Enable FFmpeg support" OFF)

if(NOT RTS_BUILD_ZEROHOUR AND NOT RTS_BUILD_GENERALS)
set(RTS_BUILD_ZEROHOUR TRUE)
Expand Down
21 changes: 13 additions & 8 deletions vcpkg.json
Original file line number Diff line number Diff line change
@@ -1,9 +1,14 @@
{
"$schema": "https://raw.githubusercontent.com/microsoft/vcpkg-tool/main/docs/vcpkg.schema.json",
"builtin-baseline": "b02e341c927f16d991edbd915d8ea43eac52096c",
"dependencies": [
"zlib",
"ffmpeg",
"stb"
]
}
"$schema": "https://raw.githubusercontent.com/microsoft/vcpkg-tool/main/docs/vcpkg.schema.json",
"builtin-baseline": "b02e341c927f16d991edbd915d8ea43eac52096c",
"dependencies": [
"zlib",
"stb"
],
"features": {
"ffmpeg": {
"description": "Use FFMPEG instead of Bink for cutscene rendering",
"dependencies": [ "ffmpeg" ]
}
}
}