cmake: move definition of Win32 flags together This makes splitting up the library build instructions later on more obvious and easier to achieve.
diff --git a/CMakeLists.txt b/CMakeLists.txt
index c1b36a6..d9b6ff2 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -76,10 +76,6 @@ IF(MSVC)
# If you want to embed a copy of libssh2 into libgit2, pass a
# path to libssh2
OPTION( EMBED_SSH_PATH "Path to libssh2 to embed (Windows)" OFF )
-
- ADD_DEFINITIONS(-D_SCL_SECURE_NO_WARNINGS)
- ADD_DEFINITIONS(-D_CRT_SECURE_NO_DEPRECATE)
- ADD_DEFINITIONS(-D_CRT_NONSTDC_NO_DEPRECATE)
ENDIF()
@@ -402,6 +398,9 @@ ENDIF()
# Platform specific compilation flags
IF (MSVC)
+ ADD_DEFINITIONS(-D_SCL_SECURE_NO_WARNINGS)
+ ADD_DEFINITIONS(-D_CRT_SECURE_NO_DEPRECATE)
+ ADD_DEFINITIONS(-D_CRT_NONSTDC_NO_DEPRECATE)
STRING(REPLACE "/Zm1000" " " CMAKE_C_FLAGS "${CMAKE_C_FLAGS}")