mirror of https://github.com/FreeRDP/FreeRDP
cmake: make MSVC static build optional
This commit is contained in:
parent
f8f1cddacf
commit
0d5867b95c
|
@ -97,7 +97,7 @@ endif()
|
|||
|
||||
# This forces the MSVC runtime to be statically linked
|
||||
|
||||
if(MSVC)
|
||||
if(WITH_MSVC_STATIC)
|
||||
foreach(flag_var CMAKE_C_FLAGS_DEBUG CMAKE_CXX_FLAGS_DEBUG CMAKE_C_FLAGS_RELEASE CMAKE_CXX_FLAGS_RELEASE CMAKE_C_FLAGS_MINSIZEREL CMAKE_CXX_FLAGS_MINSIZEREL CMAKE_C_FLAGS_RELWITHDEBINFO CMAKE_CXX_FLAGS_RELWITHDEBINFO)
|
||||
string(REGEX REPLACE "/MD" "/MT" ${flag_var} "${${flag_var}}")
|
||||
string(REGEX REPLACE "/MDd" "/MTd" ${flag_var} "${${flag_var}}")
|
||||
|
|
|
@ -12,6 +12,7 @@ endif()
|
|||
|
||||
if(MSVC)
|
||||
option(WITH_NATIVE_SSPI "Use native SSPI modules" ON)
|
||||
option(WITH_MSVC_STATIC "Use static MSVC runtime" OFF)
|
||||
endif()
|
||||
|
||||
if(${CMAKE_VERSION} VERSION_GREATER 2.8.8)
|
||||
|
|
Loading…
Reference in New Issue