Resolve CMake explicitly on Windows runner
This commit is contained in:
@@ -90,10 +90,24 @@ jobs:
|
||||
)
|
||||
C:\vcpkg\vcpkg.exe install libuv:x64-windows-static
|
||||
|
||||
- name: Resolve CMake
|
||||
shell: cmd
|
||||
run: |
|
||||
set "CMAKE_EXE="
|
||||
for %%I in (cmake.exe) do set "CMAKE_EXE=%%~$PATH:I"
|
||||
if not defined CMAKE_EXE if exist "C:\Program Files\CMake\bin\cmake.exe" set "CMAKE_EXE=C:\Program Files\CMake\bin\cmake.exe"
|
||||
if not defined CMAKE_EXE if exist "C:\Program Files (x86)\CMake\bin\cmake.exe" set "CMAKE_EXE=C:\Program Files (x86)\CMake\bin\cmake.exe"
|
||||
if not defined CMAKE_EXE (
|
||||
echo CMake not found on runner PATH or standard install locations.
|
||||
exit /b 1
|
||||
)
|
||||
echo Using CMake: %CMAKE_EXE%
|
||||
echo CMAKE_EXE=%CMAKE_EXE%>>%GITHUB_ENV%
|
||||
|
||||
- name: Configure
|
||||
shell: cmd
|
||||
run: |
|
||||
cmake -S . -B build -A x64 ^
|
||||
"%CMAKE_EXE%" -S . -B build -A x64 ^
|
||||
-DCMAKE_BUILD_TYPE=Release ^
|
||||
-DCMAKE_TOOLCHAIN_FILE=C:\vcpkg\scripts\buildsystems\vcpkg.cmake ^
|
||||
-DVCPKG_TARGET_TRIPLET=x64-windows-static ^
|
||||
@@ -106,7 +120,7 @@ jobs:
|
||||
|
||||
- name: Build
|
||||
shell: cmd
|
||||
run: cmake --build build --config Release
|
||||
run: '"%CMAKE_EXE%" --build build --config Release'
|
||||
|
||||
- name: Package
|
||||
shell: cmd
|
||||
|
||||
@@ -131,10 +131,24 @@ jobs:
|
||||
)
|
||||
C:\vcpkg\vcpkg.exe install libuv:x64-windows-static
|
||||
|
||||
- name: Resolve CMake
|
||||
shell: cmd
|
||||
run: |
|
||||
set "CMAKE_EXE="
|
||||
for %%I in (cmake.exe) do set "CMAKE_EXE=%%~$PATH:I"
|
||||
if not defined CMAKE_EXE if exist "C:\Program Files\CMake\bin\cmake.exe" set "CMAKE_EXE=C:\Program Files\CMake\bin\cmake.exe"
|
||||
if not defined CMAKE_EXE if exist "C:\Program Files (x86)\CMake\bin\cmake.exe" set "CMAKE_EXE=C:\Program Files (x86)\CMake\bin\cmake.exe"
|
||||
if not defined CMAKE_EXE (
|
||||
echo CMake not found on runner PATH or standard install locations.
|
||||
exit /b 1
|
||||
)
|
||||
echo Using CMake: %CMAKE_EXE%
|
||||
echo CMAKE_EXE=%CMAKE_EXE%>>%GITHUB_ENV%
|
||||
|
||||
- name: Configure
|
||||
shell: cmd
|
||||
run: |
|
||||
cmake -S . -B build -A x64 ^
|
||||
"%CMAKE_EXE%" -S . -B build -A x64 ^
|
||||
-DCMAKE_BUILD_TYPE=Release ^
|
||||
-DCMAKE_TOOLCHAIN_FILE=C:\vcpkg\scripts\buildsystems\vcpkg.cmake ^
|
||||
-DVCPKG_TARGET_TRIPLET=x64-windows-static ^
|
||||
@@ -147,7 +161,7 @@ jobs:
|
||||
|
||||
- name: Build
|
||||
shell: cmd
|
||||
run: cmake --build build --config Release
|
||||
run: '"%CMAKE_EXE%" --build build --config Release'
|
||||
|
||||
- name: Package
|
||||
shell: cmd
|
||||
|
||||
Reference in New Issue
Block a user