mirror of
https://github.com/Cockatrice/Cockatrice.git
synced 2026-04-27 07:48:01 -07:00
add WindowsToolchain
This commit is contained in:
parent
1cfa23a6cd
commit
80e2ccc18b
4 changed files with 16 additions and 7 deletions
7
.github/workflows/desktop-build.yml
vendored
7
.github/workflows/desktop-build.yml
vendored
|
|
@ -337,13 +337,6 @@ jobs:
|
|||
with:
|
||||
submodules: recursive
|
||||
|
||||
# Set relevant environment variables for MSVC, used to ensure ninja + MSVC build correctly together
|
||||
- name: Setup MSVC (Windows)
|
||||
if: matrix.os == 'Windows'
|
||||
uses: ilammy/msvc-dev-cmd@v1.13.0
|
||||
with:
|
||||
arch: x64
|
||||
|
||||
- name: Setup ccache
|
||||
if: matrix.use_ccache == 1 && matrix.os == 'macOS'
|
||||
run: brew install ccache
|
||||
|
|
|
|||
3
.gitmodules
vendored
3
.gitmodules
vendored
|
|
@ -4,3 +4,6 @@
|
|||
[submodule "doxygen-awesome-css"]
|
||||
path = doc/doxygen/theme
|
||||
url = https://github.com/jothepro/doxygen-awesome-css.git
|
||||
[submodule "cmake/WindowsToolchain"]
|
||||
path = cmake/WindowsToolchain
|
||||
url = https://github.com/MarkSchofield/WindowsToolchain.git
|
||||
|
|
|
|||
|
|
@ -72,6 +72,18 @@ if(WIN32 OR USE_VCPKG)
|
|||
endif()
|
||||
endif()
|
||||
|
||||
if(WIN32
|
||||
AND USE_VCPKG
|
||||
AND CMAKE_GENERATOR STREQUAL "Ninja"
|
||||
)
|
||||
# vcpkg.cmake must be the primary toolchain; MSVC+Ninja toolchain is chainloaded
|
||||
# See https://github.com/MarkSchofield/WindowsToolchain#windowstoolchain-and-vcpkg
|
||||
set(VCPKG_CHAINLOAD_TOOLCHAIN_FILE
|
||||
"${CMAKE_CURRENT_SOURCE_DIR}/cmake/WindowsToolchain/Windows.MSVC.toolchain.cmake"
|
||||
CACHE FILEPATH "Chainloaded MSVC toolchain file for Ninja generator"
|
||||
)
|
||||
endif()
|
||||
|
||||
# A project name is needed for CPack
|
||||
# Version can be overriden by git tags, see cmake/getversion.cmake
|
||||
project("Cockatrice" VERSION 2.11.0)
|
||||
|
|
|
|||
1
cmake/WindowsToolchain
Submodule
1
cmake/WindowsToolchain
Submodule
|
|
@ -0,0 +1 @@
|
|||
Subproject commit 4dc30a8bf484f41d5a16eec97b9284a52042e2b4
|
||||
Loading…
Add table
Add a link
Reference in a new issue