mirror of
https://github.com/kevinbentley/Descent3.git
synced 2025-01-22 11:28:56 +00:00
Merge pull request #422 from Lgt2x/windows-ninja
Windows CMake preset: use ninja generator
This commit is contained in:
commit
a2d3a9cc75
11
.github/workflows/build.yml
vendored
11
.github/workflows/build.yml
vendored
@ -16,7 +16,7 @@ on:
|
||||
|
||||
jobs:
|
||||
build:
|
||||
name: ${{ matrix.os.runner }}, ${{ matrix.os.cxx }}, ${{ matrix.build_type }}
|
||||
name: ${{ matrix.os.name }}, ${{ matrix.build_type }}
|
||||
strategy:
|
||||
fail-fast: false
|
||||
matrix:
|
||||
@ -73,6 +73,15 @@ jobs:
|
||||
sudo apt install -y --no-install-recommends \
|
||||
ninja-build cmake g++ libgtest-dev libsdl2-dev zlib1g-dev libspdlog-dev
|
||||
|
||||
- name: Install Windows dependencies
|
||||
if: ${{ matrix.os.runner == 'windows-latest' }}
|
||||
run: choco install ninja
|
||||
|
||||
- uses: ilammy/msvc-dev-cmd@v1
|
||||
if: ${{ matrix.os.runner == 'windows-latest' }}
|
||||
with:
|
||||
arch: ${{ matrix.os.preset }}
|
||||
|
||||
- name: Configure CMake
|
||||
env:
|
||||
CC: ${{ matrix.os.cc }}
|
||||
|
@ -9,25 +9,37 @@
|
||||
{
|
||||
"name": "win32",
|
||||
"inherits": "defaults",
|
||||
"generator": "Visual Studio 17 2022",
|
||||
"generator": "Ninja Multi-Config",
|
||||
"condition": {
|
||||
"type": "equals",
|
||||
"lhs": "${hostSystemName}",
|
||||
"rhs": "Windows"
|
||||
},
|
||||
"architecture": "Win32",
|
||||
"architecture": {
|
||||
"strategy": "external",
|
||||
"value": "x86"
|
||||
},
|
||||
"cacheVariables": {
|
||||
"VCPKG_TARGET_TRIPLET": "x86-windows"
|
||||
},
|
||||
"toolchainFile": "$env{VCPKG_ROOT}/scripts/buildsystems/vcpkg.cmake"
|
||||
},
|
||||
{
|
||||
"name": "win64",
|
||||
"inherits": "defaults",
|
||||
"generator": "Visual Studio 17 2022",
|
||||
"generator": "Ninja Multi-Config",
|
||||
"condition": {
|
||||
"type": "equals",
|
||||
"lhs": "${hostSystemName}",
|
||||
"rhs": "Windows"
|
||||
},
|
||||
"architecture": "x64",
|
||||
"cacheVariables": {
|
||||
"VCPKG_TARGET_TRIPLET": "x64-windows"
|
||||
},
|
||||
"architecture": {
|
||||
"strategy": "external",
|
||||
"value": "x64"
|
||||
},
|
||||
"toolchainFile": "$env{VCPKG_ROOT}/scripts/buildsystems/vcpkg.cmake"
|
||||
},
|
||||
{
|
||||
|
@ -105,10 +105,10 @@ setx VCPKG_ROOT="C:\path\to\vcpkg"
|
||||
setx PATH=%VCPKG_ROOT%;%PATH%
|
||||
```
|
||||
|
||||
Build Descent 3:
|
||||
Build Descent 3 using the "x86 native tools command prompt"
|
||||
```sh
|
||||
cmake --preset win -D ENABLE_LOGGER=[ON|OFF]
|
||||
cmake --build --preset win --config [Debug|Release]
|
||||
cmake --preset win32 -D ENABLE_LOGGER=[ON|OFF]
|
||||
cmake --build --preset win32 --config [Debug|Release]
|
||||
```
|
||||
|
||||
#### Building - MacOS
|
||||
|
Loading…
Reference in New Issue
Block a user