Move /MT directive to MSVC only

This commit is contained in:
Ted John 2017-11-15 23:19:30 +00:00 committed by Chris Marsh
parent 704c56d13f
commit c9cf6b3f41

View file

@ -23,6 +23,10 @@ if (${BUILD_SHARED_LIBS})
endif(${BUILD_SHARED_LIBS})
if(WIN32)
add_definitions(-DDISCORD_WINDOWS)
set(BASE_RPC_SRC ${BASE_RPC_SRC} connection_win.cpp discord_register_win.cpp)
add_library(discord-rpc ${BASE_RPC_SRC})
if (MSVC)
set(CRT_FLAGS)
if(USE_STATIC_CRT)
if (CMAKE_BUILD_TYPE STREQUAL "Debug")
@ -31,11 +35,6 @@ if(WIN32)
set(CRT_FLAGS /MT)
endif()
endif(USE_STATIC_CRT)
add_definitions(-DDISCORD_WINDOWS)
set(BASE_RPC_SRC ${BASE_RPC_SRC} connection_win.cpp discord_register_win.cpp)
add_library(discord-rpc ${BASE_RPC_SRC})
if (MSVC)
target_compile_options(discord-rpc PRIVATE /EHsc
${CRT_FLAGS}
/Wall