Skip to content

Commit

Permalink
I don't know what I'm doing but it works
Browse files Browse the repository at this point in the history
  • Loading branch information
frenzibyte committed Aug 8, 2024
1 parent c17120b commit 828b5dd
Showing 1 changed file with 6 additions and 4 deletions.
10 changes: 6 additions & 4 deletions ext/sync-shaderc.cmd
Original file line number Diff line number Diff line change
Expand Up @@ -4,12 +4,14 @@
python %~dp0update_shaderc_sources.py --dir %~dp0shaderc --file %~dp0known_good.json

:: Android NDK 27+ need this policy set on shaderc (as well as other tools)
ren >%~dp0shaderc\CMakeLists.txt >%~dp0shaderc\CMakeLists.tmp
move /y %~dp0shaderc\CMakeLists.txt %~dp0shaderc\CMakeLists.tmp

setlocal enableDelayedExpansion
set p=
for /f %%a in (%~dp0shaderc\CMakeLists.tmp) do (
if "!p!"=="cmake_minimum_required^(VERSION 2.8.12^)" Echo "cmake_policy^(SET CMP0057 NEW^)" >>%~dp0shaderc\CMakeLists.txt
Echo %%a >>%~dp0shaderc\CMakeLists.tmp
for /f "tokens=* delims=" %%a in (%~dp0shaderc\CMakeLists.tmp) do (
if "!p!"=="cmake_minimum_required(VERSION 2.8.12)" echo cmake_policy(SET CMP0057 NEW^)>>%~dp0shaderc\CMakeLists.txt
(echo %%a) >>%~dp0shaderc\CMakeLists.txt
set p=%%a
)
del %~dp0shaderc\CMakeLists.tmp

0 comments on commit 828b5dd

Please sign in to comment.