Skip to content
Merged
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 @@ -26,6 +26,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 @@ -133,7 +138,7 @@ jobs:
-Source "https://nuget.pkg.github.com/${{ github.repository_owner }}/index.json"
"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 @@ -146,6 +151,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
2 changes: 2 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -149,6 +149,7 @@ jobs:
- preset: "win32-vcpkg"
tools: true
extras: true
ffmpeg: true
- preset: "win32-vcpkg-profile"
tools: true
extras: true
Expand All @@ -162,6 +163,7 @@ jobs:
preset: ${{ matrix.preset }}
tools: ${{ matrix.tools }}
extras: ${{ matrix.extras }}
ffmpeg: ${{ matrix.ffmpeg || false}}
secrets: inherit

replaycheck-generalsmd:
Expand Down
4 changes: 4 additions & 0 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,10 @@ 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 the project block
# since they need to be initialized before the toolchain is
include(cmake/config-vcpkg.cmake)

# 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
6 changes: 6 additions & 0 deletions cmake/config-vcpkg.cmake
Comment thread
tsunamistate marked this conversation as resolved.
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
# Contains options for VCPKG features

option(RTS_BUILD_OPTION_FFMPEG "Enable FFmpeg support" OFF)
if(RTS_BUILD_OPTION_FFMPEG)
list(APPEND VCPKG_MANIFEST_FEATURES "ffmpeg")
endif()
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": "9e593bb18ea69cc5095e012465dcd675a822ed0d",
"dependencies": [
"zlib",
"ffmpeg",
"stb"
]
}
"$schema": "https://raw.githubusercontent.com/microsoft/vcpkg-tool/main/docs/vcpkg.schema.json",
"builtin-baseline": "9e593bb18ea69cc5095e012465dcd675a822ed0d",
"dependencies": [
"zlib",
"stb"
],
"features": {
"ffmpeg": {
"description": "Use FFmpeg instead of Bink for video rendering",
"dependencies": [ "ffmpeg" ]
}
}
}
Loading