Commit 4c32adee authored by Martin Schultz's avatar Martin Schultz

* added define to compile crt statically with msvc

parent ca43376d
......@@ -75,6 +75,19 @@ IF(ACGL_COMPILE_WITH_QT)
SET(LIBRARIES ${LIBRARIES} ${QT_LIBRARIES})
ENDIF()
# static linking for MSVC
IF(ACGL_STATIC_RUNTIME_ENV)
if(MSVC)
foreach(flag
CMAKE_CXX_FLAGS CMAKE_CXX_FLAGS_DEBUG CMAKE_CXX_FLAGS_RELEASE
CMAKE_CXX_FLAGS_MINSIZEREL CMAKE_CXX_FLAGS_RELWITHDEBINFO)
if(${flag} MATCHES "/MD")
string(REGEX REPLACE "/MD" "/MT" ${flag} "${${flag}}")
endif()
endforeach()
endif()
ENDIF()
################################################################################
# Final Definition
################################################################################
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment