Skip to content

Commit

Permalink
add static linker flags for win32
Browse files Browse the repository at this point in the history
  • Loading branch information
moonshadow565 committed Apr 29, 2020
1 parent 9c9695f commit 017262e
Showing 1 changed file with 9 additions and 0 deletions.
9 changes: 9 additions & 0 deletions CMakeLists.txt
100644 → 100755
Original file line number Diff line number Diff line change
@@ -1,6 +1,15 @@
cmake_minimum_required(VERSION 3.5)
project(lolsrv LANGUAGES CXX)

if(WIN32)
if(MSVC)
set(CMAKE_C_FLAGS_RELEASE "${CMAKE_C_FLAGS_RELEASE} /MT")
set(CMAKE_CXX_FLAGS_RELEASE "${CMAKE_CXX_FLAGS_RELEASE} /MT")
else()
set(CMAKE_EXE_LINKER_FLAGS "${CMAKE_EXE_LINKER_FLAGS} -static -static-libstdc++ -static-libgcc")
endif()
endif()

set(CMAKE_CXX_STANDARD 17)
set(CMAKE_CXX_STANDARD_REQUIRED ON)
add_subdirectory(enet)
Expand Down

0 comments on commit 017262e

Please sign in to comment.