Skip to content

Commit

Permalink
cmake: make MSVC static build optional
Browse files Browse the repository at this point in the history
  • Loading branch information
awakecoding committed Aug 29, 2012
1 parent f8f1cdd commit 0d5867b
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 1 deletion.
2 changes: 1 addition & 1 deletion CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -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}}")
Expand Down
1 change: 1 addition & 0 deletions cmake/ConfigOptions.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down

0 comments on commit 0d5867b

Please sign in to comment.