mirror of
https://github.com/Cockatrice/Cockatrice.git
synced 2026-04-27 07:48:01 -07:00
Merge 9fd1fcb5db into b1fe4c85d3
This commit is contained in:
commit
e51a8fa45d
8 changed files with 29 additions and 20 deletions
|
|
@ -247,7 +247,7 @@ if [[ $RUNNER_OS == macOS ]]; then
|
|||
flags+=(-DCPACK_COMMAND_HDIUTIL="$hdiutil_script")
|
||||
fi
|
||||
|
||||
elif [[ $RUNNER_OS == Windows ]]; then
|
||||
elif [[ $RUNNER_OS == Windows ]] && [[ "$CMAKE_GENERATOR" != *Ninja* ]]; then
|
||||
# Enable MTT, see https://devblogs.microsoft.com/cppblog/improved-parallelism-in-msbuild/
|
||||
# and https://devblogs.microsoft.com/cppblog/cpp-build-throughput-investigation-and-tune-up/#multitooltask-mtt
|
||||
buildflags+=(-- -p:UseMultiToolTask=true -p:EnableClServerMode=true)
|
||||
|
|
|
|||
17
.github/workflows/desktop-build.yml
vendored
17
.github/workflows/desktop-build.yml
vendored
|
|
@ -340,8 +340,7 @@ jobs:
|
|||
qt_version: 6.11.*
|
||||
qt_arch: win64_msvc2022_64
|
||||
qt_modules: qtimageformats qtmultimedia qtwebsockets
|
||||
cmake_generator: "Visual Studio 17 2022"
|
||||
cmake_generator_platform: x64
|
||||
cmake_generator: Ninja
|
||||
|
||||
name: ${{matrix.os}} ${{matrix.target}}${{ matrix.soc == 'Intel' && ' Intel' || '' }}${{ matrix.type == 'Debug' && ' Debug' || '' }}
|
||||
needs: configure
|
||||
|
|
@ -359,13 +358,6 @@ jobs:
|
|||
with:
|
||||
submodules: recursive
|
||||
|
||||
- name: Add msbuild to PATH
|
||||
if: matrix.os == 'Windows'
|
||||
id: add-msbuild
|
||||
uses: microsoft/setup-msbuild@v3
|
||||
with:
|
||||
msbuild-architecture: x64
|
||||
|
||||
- name: Setup ccache
|
||||
if: matrix.use_ccache == 1 && matrix.os == 'macOS'
|
||||
run: brew install ccache
|
||||
|
|
@ -452,7 +444,6 @@ jobs:
|
|||
MAKE_PACKAGE: '${{matrix.make_package}}'
|
||||
PACKAGE_SUFFIX: '${{matrix.package_suffix}}'
|
||||
CMAKE_GENERATOR: ${{matrix.cmake_generator}}
|
||||
CMAKE_GENERATOR_PLATFORM: ${{matrix.cmake_generator_platform}}
|
||||
USE_CCACHE: ${{matrix.use_ccache}}
|
||||
VCPKG_DISABLE_METRICS: 1
|
||||
VCPKG_BINARY_SOURCES: 'clear;files,${{ steps.vcpkg-cache.outputs.path }},readwrite'
|
||||
|
|
@ -544,9 +535,9 @@ jobs:
|
|||
with:
|
||||
name: ${{steps.build.outputs.name}}-PDBs
|
||||
path: |
|
||||
build/cockatrice/Release/*.pdb
|
||||
build/oracle/Release/*.pdb
|
||||
build/servatrice/Release/*.pdb
|
||||
build/cockatrice/**/*.pdb
|
||||
build/oracle/**/*.pdb
|
||||
build/servatrice/**/*.pdb
|
||||
if-no-files-found: error
|
||||
|
||||
- name: Upload to release
|
||||
|
|
|
|||
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 3.0.0)
|
||||
|
|
@ -140,8 +152,8 @@ endif()
|
|||
|
||||
# Define proper compilation flags
|
||||
if(MSVC)
|
||||
# Disable Warning C4251, C++20 compatibility, Multi-threaded Builds, Warn Detection, Unwind Semantics, Debug Symbols
|
||||
set(CMAKE_CXX_FLAGS "/wd4251 /Zc:__cplusplus /std:c++20 /permissive- /W4 /MP /EHsc /Zi")
|
||||
# Disable Warning C4251, C++20 compatibility, Multi-threaded Builds, Warn Detection, Unwind Semantics, Debug Symbols, Force Synchronous PDB writes
|
||||
set(CMAKE_CXX_FLAGS "/wd4251 /Zc:__cplusplus /std:c++20 /permissive- /W4 /MP /EHsc /Zi /FS")
|
||||
# Visual Studio: Maximum Optimization, Multi-threaded DLL
|
||||
set(CMAKE_CXX_FLAGS_RELEASE "/Ox /MD")
|
||||
# Visual Studio: No Optimization, Multi-threaded Debug DLL
|
||||
|
|
@ -311,7 +323,9 @@ if(UNIX)
|
|||
endif()
|
||||
elseif(WIN32)
|
||||
set(CPACK_GENERATOR NSIS ${CPACK_GENERATOR})
|
||||
if("${CMAKE_GENERATOR_PLATFORM}" MATCHES "(x64)")
|
||||
# This a generator-agnostic way to determine if the build is 64-bit or 32-bit.
|
||||
# See https://cmake.org/cmake/help/latest/variable/CMAKE_SIZEOF_VOID_P.html
|
||||
if(CMAKE_SIZEOF_VOID_P EQUAL 8)
|
||||
set(TRICE_IS_64_BIT 1)
|
||||
else()
|
||||
set(TRICE_IS_64_BIT 0)
|
||||
|
|
|
|||
1
cmake/WindowsToolchain
Submodule
1
cmake/WindowsToolchain
Submodule
|
|
@ -0,0 +1 @@
|
|||
Subproject commit 4dc30a8bf484f41d5a16eec97b9284a52042e2b4
|
||||
|
|
@ -529,7 +529,7 @@ if(WIN32)
|
|||
set(qtconf_dest_dir .)
|
||||
|
||||
install(
|
||||
DIRECTORY "${CMAKE_BINARY_DIR}/${PROJECT_NAME}/${CMAKE_BUILD_TYPE}/"
|
||||
DIRECTORY "$<TARGET_FILE_DIR:cockatrice>/"
|
||||
DESTINATION ./
|
||||
FILES_MATCHING
|
||||
PATTERN "*.dll"
|
||||
|
|
|
|||
|
|
@ -234,7 +234,7 @@ if(WIN32)
|
|||
list(APPEND libSearchDirs ${QT_LIBRARY_DIR})
|
||||
|
||||
install(
|
||||
DIRECTORY "${CMAKE_BINARY_DIR}/${PROJECT_NAME}/${CMAKE_BUILD_TYPE}/"
|
||||
DIRECTORY "$<TARGET_FILE_DIR:oracle>/"
|
||||
DESTINATION ./
|
||||
FILES_MATCHING
|
||||
PATTERN "*.dll"
|
||||
|
|
|
|||
|
|
@ -184,7 +184,7 @@ if(WIN32)
|
|||
set(qtconf_dest_dir .)
|
||||
|
||||
install(
|
||||
DIRECTORY "${CMAKE_BINARY_DIR}/${PROJECT_NAME}/${CMAKE_BUILD_TYPE}/"
|
||||
DIRECTORY "$<TARGET_FILE_DIR:servatrice>/"
|
||||
DESTINATION ./
|
||||
FILES_MATCHING
|
||||
PATTERN "*.dll"
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue