cmake: define WIN_RC with other platform sources 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 5caa6e5..d56069a 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -265,8 +265,6 @@ IF (MSVC)
SET(CMAKE_SHARED_LINKER_FLAGS_RELEASE "${CMAKE_EXE_LINKER_FLAGS_RELEASE}")
SET(CMAKE_SHARED_LINKER_FLAGS_RELWITHDEBINFO "${CMAKE_EXE_LINKER_FLAGS_RELWITHDEBINFO}")
SET(CMAKE_SHARED_LINKER_FLAGS_MINSIZEREL "${CMAKE_EXE_LINKER_FLAGS_MINSIZEREL}")
-
- SET(WIN_RC "src/win32/git2.rc")
ELSE ()
SET(CMAKE_C_FLAGS "-D_GNU_SOURCE ${CMAKE_C_FLAGS}")
@@ -593,6 +591,11 @@ FILE(GLOB SRC_H include/git2.h include/git2/*.h include/git2/sys/*.h)
# On Windows use specific platform sources
IF (WIN32 AND NOT CYGWIN)
ADD_DEFINITIONS(-DWIN32 -D_WIN32_WINNT=0x0501)
+
+ IF(MSVC)
+ SET(WIN_RC "src/win32/git2.rc")
+ ENDIF()
+
FILE(GLOB SRC_OS src/win32/*.c src/win32/*.h)
ELSEIF (AMIGA)
ADD_DEFINITIONS(-DNO_ADDRINFO -DNO_READDIR_R -DNO_MMAP)