Commit 90412507 by Em Committed by Vicent Marti

Port MSVC specific Waf compilation flags to CMake and remove dynamic dependence…

Port MSVC specific Waf compilation flags to CMake and remove dynamic dependence to msvcr100.dll on Windows

The '/MT' and '/MTd' flags replace the dynamic link to 'msvcr100.dll' with a static link to 'libcmt.lib'. This has the nice effect to ease the deployment of libgit2 by removing the dependence on 'msvcr100.dll' which is not deployed by default on Windows.
parent 7548b8af
......@@ -34,6 +34,13 @@ OPTION (BUILD_SHARED_LIBS "Build Shared Library (OFF for Static)" OFF)
OPTION (BUILD_TESTS "Build Tests" ON)
OPTION (THREADSAFE "Build libgit2 as threadsafe" OFF)
# Platform specific compilation flags
IF (MSVC)
SET(CMAKE_C_FLAGS "/TC /W4 /WX /nologo /Zi")
SET(CMAKE_C_FLAGS_DEBUG "/Od /RTC1 /RTCc /DEBUG /MTd")
SET(CMAKE_C_FLAGS_RELEASE "/MT /O2")
ENDIF()
# Build Release by default
IF (NOT CMAKE_BUILD_TYPE)
SET(CMAKE_BUILD_TYPE "Debug" CACHE STRING "Choose the type of build, options are: Debug Release RelWithDebInfo MinSizeRel." FORCE)
......
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