Move /MT directive to MSVC only
This commit is contained in:
parent
704c56d13f
commit
c9cf6b3f41
1 changed files with 23 additions and 24 deletions
|
@ -23,34 +23,33 @@ if (${BUILD_SHARED_LIBS})
|
||||||
endif(${BUILD_SHARED_LIBS})
|
endif(${BUILD_SHARED_LIBS})
|
||||||
|
|
||||||
if(WIN32)
|
if(WIN32)
|
||||||
set(CRT_FLAGS)
|
|
||||||
if(USE_STATIC_CRT)
|
|
||||||
if (CMAKE_BUILD_TYPE STREQUAL "Debug")
|
|
||||||
set(CRT_FLAGS /MTd)
|
|
||||||
else()
|
|
||||||
set(CRT_FLAGS /MT)
|
|
||||||
endif()
|
|
||||||
endif(USE_STATIC_CRT)
|
|
||||||
|
|
||||||
add_definitions(-DDISCORD_WINDOWS)
|
add_definitions(-DDISCORD_WINDOWS)
|
||||||
set(BASE_RPC_SRC ${BASE_RPC_SRC} connection_win.cpp discord_register_win.cpp)
|
set(BASE_RPC_SRC ${BASE_RPC_SRC} connection_win.cpp discord_register_win.cpp)
|
||||||
add_library(discord-rpc ${BASE_RPC_SRC})
|
add_library(discord-rpc ${BASE_RPC_SRC})
|
||||||
if (MSVC)
|
if (MSVC)
|
||||||
target_compile_options(discord-rpc PRIVATE /EHsc
|
set(CRT_FLAGS)
|
||||||
${CRT_FLAGS}
|
if(USE_STATIC_CRT)
|
||||||
/Wall
|
if (CMAKE_BUILD_TYPE STREQUAL "Debug")
|
||||||
/wd4100 # unreferenced formal parameter
|
set(CRT_FLAGS /MTd)
|
||||||
/wd4514 # unreferenced inline
|
else()
|
||||||
/wd4625 # copy constructor deleted
|
set(CRT_FLAGS /MT)
|
||||||
/wd5026 # move constructor deleted
|
endif()
|
||||||
/wd4626 # move assignment operator deleted
|
endif(USE_STATIC_CRT)
|
||||||
/wd4668 # not defined preprocessor macro
|
target_compile_options(discord-rpc PRIVATE /EHsc
|
||||||
/wd4710 # function not inlined
|
${CRT_FLAGS}
|
||||||
/wd4711 # function was inlined
|
/Wall
|
||||||
/wd4820 # structure padding
|
/wd4100 # unreferenced formal parameter
|
||||||
/wd4946 # reinterpret_cast used between related classes
|
/wd4514 # unreferenced inline
|
||||||
/wd5027 # move assignment operator was implicitly defined as deleted
|
/wd4625 # copy constructor deleted
|
||||||
)
|
/wd5026 # move constructor deleted
|
||||||
|
/wd4626 # move assignment operator deleted
|
||||||
|
/wd4668 # not defined preprocessor macro
|
||||||
|
/wd4710 # function not inlined
|
||||||
|
/wd4711 # function was inlined
|
||||||
|
/wd4820 # structure padding
|
||||||
|
/wd4946 # reinterpret_cast used between related classes
|
||||||
|
/wd5027 # move assignment operator was implicitly defined as deleted
|
||||||
|
)
|
||||||
endif(MSVC)
|
endif(MSVC)
|
||||||
target_link_libraries(discord-rpc PRIVATE psapi)
|
target_link_libraries(discord-rpc PRIVATE psapi)
|
||||||
endif(WIN32)
|
endif(WIN32)
|
||||||
|
|
Loading…
Reference in a new issue