File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 2626 default : false
2727 type : boolean
2828 description : " Build extras"
29+ ffmpeg :
30+ required : false
31+ default : false
32+ type : boolean
33+ description : " Build with FFmpeg support"
2934
3035jobs :
3136 build :
@@ -133,7 +138,7 @@ jobs:
133138 -Source "https://nuget.pkg.github.com/${{ github.repository_owner }}/index.json"
134139 "VCPKG_INSTALL_OPTIONS=--x-abi-tools-use-exact-versions" >> $env:GITHUB_ENV
135140
136- - name : Configure ${{ inputs.game }} with CMake Using ${{ inputs.preset }}${{ inputs.tools && '+t' || '' }}${{ inputs.extras && '+e' || '' }} Preset
141+ - name : Configure ${{ inputs.game }} with CMake Using ${{ inputs.preset }}${{ inputs.tools && '+t' || '' }}${{ inputs.extras && '+e' || '' }}${{ inputs.ffmpeg && '+ffmpeg' || '' }} Preset
137142 shell : pwsh
138143 run : |
139144 $buildFlags = @(
@@ -146,6 +151,7 @@ jobs:
146151 $buildFlags += "-DRTS_BUILD_${gamePrefix}_TOOLS=${{ inputs.tools && 'ON' || 'OFF' }}"
147152 $buildFlags += "-DRTS_BUILD_CORE_EXTRAS=${{ inputs.extras && 'ON' || 'OFF' }}"
148153 $buildFlags += "-DRTS_BUILD_${gamePrefix}_EXTRAS=${{ inputs.extras && 'ON' || 'OFF' }}"
154+ $buildFlags += "-DRTS_BUILD_OPTION_FFMPEG=${{ inputs.ffmpeg && 'ON' || 'OFF' }}"
149155
150156 Write-Host "Build flags: $($buildFlags -join ' | ')"
151157 cmake --preset ${{ inputs.preset }} $buildFlags
Original file line number Diff line number Diff line change @@ -149,6 +149,7 @@ jobs:
149149 - preset : " win32-vcpkg"
150150 tools : true
151151 extras : true
152+ ffmpeg : true
152153 - preset : " win32-vcpkg-profile"
153154 tools : true
154155 extras : true
@@ -162,6 +163,7 @@ jobs:
162163 preset : ${{ matrix.preset }}
163164 tools : ${{ matrix.tools }}
164165 extras : ${{ matrix.extras }}
166+ ffmpeg : ${{ matrix.ffmpeg || false}}
165167 secrets : inherit
166168
167169 replaycheck-generalsmd :
Original file line number Diff line number Diff line change @@ -30,6 +30,10 @@ if (CMAKE_BINARY_DIR STREQUAL CMAKE_SOURCE_DIR)
3030 message (FATAL_ERROR "Building in-source is not supported! Create a build dir and remove ${CMAKE_SOURCE_DIR } /CMakeCache.txt" )
3131endif ()
3232
33+ # Define VCPKG feature before the project block
34+ # since they need to be initialized before the toolchain is
35+ include (cmake/config-vcpkg.cmake )
36+
3337# Top level project, doesn't really affect anything.
3438project (genzh LANGUAGES C CXX )
3539
Original file line number Diff line number Diff line change @@ -8,7 +8,6 @@ option(RTS_BUILD_OPTION_PROFILE_TRACY "Build code with Tracy profiling enabled."
88option (RTS_BUILD_OPTION_DEBUG "Build code with the \" Debug\" configuration." OFF )
99option (RTS_BUILD_OPTION_ASAN "Build code with Address Sanitizer." OFF )
1010option (RTS_BUILD_OPTION_VC6_FULL_DEBUG "Build VC6 with full debug info." OFF )
11- option (RTS_BUILD_OPTION_FFMPEG "Enable FFmpeg support" OFF )
1211
1312if (NOT RTS_BUILD_ZEROHOUR AND NOT RTS_BUILD_GENERALS)
1413 set (RTS_BUILD_ZEROHOUR TRUE )
Original file line number Diff line number Diff line change 1+ # Contains options for VCPKG features
2+
3+ option (RTS_BUILD_OPTION_FFMPEG "Enable FFmpeg support" OFF )
4+ if (RTS_BUILD_OPTION_FFMPEG)
5+ list (APPEND VCPKG_MANIFEST_FEATURES "ffmpeg" )
6+ endif ()
Original file line number Diff line number Diff line change 11{
2- "$schema" : " https://raw.githubusercontent.com/microsoft/vcpkg-tool/main/docs/vcpkg.schema.json" ,
3- "builtin-baseline" : " 9e593bb18ea69cc5095e012465dcd675a822ed0d" ,
4- "dependencies" : [
5- " zlib" ,
6- " ffmpeg" ,
7- " stb"
8- ]
9- }
2+ "$schema" : " https://raw.githubusercontent.com/microsoft/vcpkg-tool/main/docs/vcpkg.schema.json" ,
3+ "builtin-baseline" : " 9e593bb18ea69cc5095e012465dcd675a822ed0d" ,
4+ "dependencies" : [
5+ " zlib" ,
6+ " stb"
7+ ],
8+ "features" : {
9+ "ffmpeg" : {
10+ "description" : " Use FFmpeg instead of Bink for video rendering" ,
11+ "dependencies" : [ " ffmpeg" ]
12+ }
13+ }
14+ }
You can’t perform that action at this time.
0 commit comments