Skip to content
This repository has been archived by the owner on Jul 6, 2023. It is now read-only.

Commit

Permalink
statically link vcruntime
Browse files Browse the repository at this point in the history
  • Loading branch information
gyf304 authored May 7, 2021
1 parent 8164f72 commit 4a4a32c
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 2 deletions.
7 changes: 5 additions & 2 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
cmake_minimum_required(VERSION 3.11)
cmake_minimum_required(VERSION 3.16)

project(lpvpn)

Expand Down Expand Up @@ -40,7 +40,10 @@ target_compile_definitions(
)

if (WIN32)
set_target_properties(lpvpn PROPERTIES LINK_FLAGS "/MANIFESTUAC:\"level='requireAdministrator' uiAccess='false'\" /SUBSYSTEM:WINDOWS")
set_target_properties(lpvpn PROPERTIES
LINK_FLAGS "/MANIFESTUAC:\"level='requireAdministrator' uiAccess='false'\" /SUBSYSTEM:WINDOWS"
MSVC_RUNTIME_LIBRARY "MultiThreaded$<$<CONFIG:Debug>:Debug>"
)
endif()

target_link_libraries(lpvpn PRIVATE wxmono lpvpn::rc Wintun DiscordGameSDK MemoryModule)
Expand Down
2 changes: 2 additions & 0 deletions cmake/wxWidgets.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,8 @@ if(NOT wxwidgets_POPULATED)
FetchContent_Populate(wxwidgets)
endif()

set(CMAKE_MSVC_RUNTIME_LIBRARY "MultiThreaded$<$<CONFIG:Debug>:Debug>")
set(wxBUILD_MONOLITHIC ON CACHE INTERNAL "")
set(wxBUILD_SHARED OFF CACHE INTERNAL "")
set(wxBUILD_USE_STATIC_RUNTIME ON CACHE INTERNAL "")
add_subdirectory("${wxwidgets_SOURCE_DIR}")

0 comments on commit 4a4a32c

Please sign in to comment.