Skip to content

Commit bed7ca3

Browse files
committed
cmake: define WIN_RC with other platform sources
This makes splitting up the library build instructions later on more obvious and easier to achieve.
1 parent 8ee90c3 commit bed7ca3

File tree

1 file changed

+5
-2
lines changed

1 file changed

+5
-2
lines changed

CMakeLists.txt

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -265,8 +265,6 @@ IF (MSVC)
265265
SET(CMAKE_SHARED_LINKER_FLAGS_RELEASE "${CMAKE_EXE_LINKER_FLAGS_RELEASE}")
266266
SET(CMAKE_SHARED_LINKER_FLAGS_RELWITHDEBINFO "${CMAKE_EXE_LINKER_FLAGS_RELWITHDEBINFO}")
267267
SET(CMAKE_SHARED_LINKER_FLAGS_MINSIZEREL "${CMAKE_EXE_LINKER_FLAGS_MINSIZEREL}")
268-
269-
SET(WIN_RC "src/win32/git2.rc")
270268
ELSE ()
271269
SET(CMAKE_C_FLAGS "-D_GNU_SOURCE ${CMAKE_C_FLAGS}")
272270

@@ -593,6 +591,11 @@ FILE(GLOB SRC_H include/git2.h include/git2/*.h include/git2/sys/*.h)
593591
# On Windows use specific platform sources
594592
IF (WIN32 AND NOT CYGWIN)
595593
ADD_DEFINITIONS(-DWIN32 -D_WIN32_WINNT=0x0501)
594+
595+
IF(MSVC)
596+
SET(WIN_RC "src/win32/git2.rc")
597+
ENDIF()
598+
596599
FILE(GLOB SRC_OS src/win32/*.c src/win32/*.h)
597600
ELSEIF (AMIGA)
598601
ADD_DEFINITIONS(-DNO_ADDRINFO -DNO_READDIR_R -DNO_MMAP)

0 commit comments

Comments
 (0)