Skip to content

Commit

Permalink
Chore: Statically link the Microsoft Visual C++ Runtime Library
Browse files Browse the repository at this point in the history
  • Loading branch information
czs108 committed Aug 1, 2021
1 parent 8c6a2d0 commit 5d1e993
Show file tree
Hide file tree
Showing 6 changed files with 6 additions and 1 deletion.
2 changes: 1 addition & 1 deletion CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
cmake_minimum_required(VERSION 3.20.0)

cmake_policy(SET CMP0091 NEW)
project(Plants-vs-Zombies-Online-Battle LANGUAGES CXX)

if((NOT CMAKE_SYSTEM_NAME STREQUAL "Windows") OR (NOT CMAKE_SIZEOF_VOID_P EQUAL 4))
Expand Down
1 change: 1 addition & 0 deletions src/lib/game/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
add_library(game "")
set_target_properties(game PROPERTIES MSVC_RUNTIME_LIBRARY "MultiThreaded$<$<CONFIG:Release>:Release>")
# target_compile_definitions(game PRIVATE INET6=1)

set(HEADER_PATH ${PROJECT_SOURCE_DIR}/include/game)
Expand Down
1 change: 1 addition & 0 deletions src/lib/network/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
add_library(network "")
set_target_properties(network PROPERTIES MSVC_RUNTIME_LIBRARY "MultiThreaded$<$<CONFIG:Release>:Release>")

set(HEADER_PATH ${PROJECT_SOURCE_DIR}/include/network)
target_include_directories(network PUBLIC ${HEADER_PATH})
Expand Down
1 change: 1 addition & 0 deletions src/lib/system/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
add_library(system "")
set_target_properties(system PROPERTIES MSVC_RUNTIME_LIBRARY "MultiThreaded$<$<CONFIG:Release>:Release>")

set(HEADER_PATH ${PROJECT_SOURCE_DIR}/include/system)
target_include_directories(system PUBLIC ${HEADER_PATH})
Expand Down
1 change: 1 addition & 0 deletions src/plant/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -1,2 +1,3 @@
add_library(plant SHARED dllmain.cpp)
set_target_properties(plant PROPERTIES MSVC_RUNTIME_LIBRARY "MultiThreaded$<$<CONFIG:Release>:Release>")
target_link_libraries(plant PRIVATE game)
1 change: 1 addition & 0 deletions src/zombie/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -1,2 +1,3 @@
add_library(zombie SHARED dllmain.cpp)
set_target_properties(zombie PROPERTIES MSVC_RUNTIME_LIBRARY "MultiThreaded$<$<CONFIG:Release>:Release>")
target_link_libraries(zombie PRIVATE game)

0 comments on commit 5d1e993

Please sign in to comment.