From 136ee78cfd497c0defa47d667ba0e2bf3bf612ef Mon Sep 17 00:00:00 2001 From: Roman Chistokhodov Date: Fri, 27 Aug 2021 11:04:15 +0300 Subject: [PATCH 1/2] Make msvc builds in release mode with static runtime (#185) --- .github/workflows/.github.yml | 2 +- CMakeLists.txt | 4 ++++ appveyor.yml | 1 + cl_dll/CMakeLists.txt | 4 ++++ dlls/CMakeLists.txt | 4 ++++ 5 files changed, 14 insertions(+), 1 deletion(-) diff --git a/.github/workflows/.github.yml b/.github/workflows/.github.yml index 26151361..8b5b6ecf 100644 --- a/.github/workflows/.github.yml +++ b/.github/workflows/.github.yml @@ -72,7 +72,7 @@ jobs: if: startsWith(matrix.os, 'windows') run: | cmake -G "Visual Studio 15 2017" -B build -DGOLDSOURCE_SUPPORT=ON -DCMAKE_INSTALL_PREFIX="dist" - msbuild build/INSTALL.vcxproj + msbuild -verbosity:normal /property:Configuration=Release build/INSTALL.vcxproj - name: Extract branch name shell: bash diff --git a/CMakeLists.txt b/CMakeLists.txt index 868c5e7f..35b4fad5 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -22,6 +22,10 @@ cmake_minimum_required(VERSION 2.8.12) +if(${CMAKE_VERSION} VERSION_GREATER_EQUAL "3.15.0") + cmake_policy(SET CMP0091 NEW) +endif() + # Install custom module path set(CMAKE_MODULE_PATH ${CMAKE_MODULE_PATH} "${CMAKE_SOURCE_DIR}/cmake/") diff --git a/appveyor.yml b/appveyor.yml index bb4ba61d..6616ee57 100644 --- a/appveyor.yml +++ b/appveyor.yml @@ -16,6 +16,7 @@ build: configuration: - Debug + - Release before_build: - git submodule update --init --recursive diff --git a/cl_dll/CMakeLists.txt b/cl_dll/CMakeLists.txt index 11cf81cd..07d6b0d0 100644 --- a/cl_dll/CMakeLists.txt +++ b/cl_dll/CMakeLists.txt @@ -147,6 +147,10 @@ if(APPLE OR WIN32 OR ${CMAKE_SYSTEM_NAME} STREQUAL "Linux") PREFIX "") endif() +if(MSVC) + set_property(TARGET ${CLDLL_LIBRARY} PROPERTY MSVC_RUNTIME_LIBRARY "MultiThreaded$<$:Debug>") +endif() + install( TARGETS ${CLDLL_LIBRARY} DESTINATION "${GAMEDIR}/${CLIENT_INSTALL_DIR}/" PERMISSIONS OWNER_READ OWNER_WRITE OWNER_EXECUTE diff --git a/dlls/CMakeLists.txt b/dlls/CMakeLists.txt index 053bc26b..4f8e60ac 100644 --- a/dlls/CMakeLists.txt +++ b/dlls/CMakeLists.txt @@ -177,6 +177,10 @@ if(APPLE OR WIN32 OR ${CMAKE_SYSTEM_NAME} STREQUAL "Linux") PREFIX "") endif() +if(MSVC) + set_property(TARGET ${SVDLL_LIBRARY} PROPERTY MSVC_RUNTIME_LIBRARY "MultiThreaded$<$:Debug>") +endif() + install( TARGETS ${SVDLL_LIBRARY} DESTINATION "${GAMEDIR}/${SERVER_INSTALL_DIR}/" PERMISSIONS OWNER_READ OWNER_WRITE OWNER_EXECUTE From 060a6c3269ced26c3c5f8eae8490b9ac5800a514 Mon Sep 17 00:00:00 2001 From: Andrey Akhmichin Date: Mon, 13 Sep 2021 01:13:23 +0500 Subject: [PATCH 2/2] Update README.md. --- README.md | 2 -- 1 file changed, 2 deletions(-) diff --git a/README.md b/README.md index 86c9c9c0..32d4fc05 100644 --- a/README.md +++ b/README.md @@ -37,8 +37,6 @@ These scripts also can be ran via wine: The libraries built this way are always GoldSource compatible. -There're dsp projects for Visual Studio 6 in `cl_dll` and `dlls` directories, but we don't keep them up-to-date. You're free to adapt them for yourself and try to import into the newer Visual Studio versions. - #### Using mingw TODO