Commit bed7ca3a by Patrick Steinhardt

cmake: define WIN_RC with other platform sources

This makes splitting up the library build instructions later on more
obvious and easier to achieve.
parent 8ee90c39
...@@ -265,8 +265,6 @@ IF (MSVC) ...@@ -265,8 +265,6 @@ IF (MSVC)
SET(CMAKE_SHARED_LINKER_FLAGS_RELEASE "${CMAKE_EXE_LINKER_FLAGS_RELEASE}") 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_RELWITHDEBINFO "${CMAKE_EXE_LINKER_FLAGS_RELWITHDEBINFO}")
SET(CMAKE_SHARED_LINKER_FLAGS_MINSIZEREL "${CMAKE_EXE_LINKER_FLAGS_MINSIZEREL}") SET(CMAKE_SHARED_LINKER_FLAGS_MINSIZEREL "${CMAKE_EXE_LINKER_FLAGS_MINSIZEREL}")
SET(WIN_RC "src/win32/git2.rc")
ELSE () ELSE ()
SET(CMAKE_C_FLAGS "-D_GNU_SOURCE ${CMAKE_C_FLAGS}") 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) ...@@ -593,6 +591,11 @@ FILE(GLOB SRC_H include/git2.h include/git2/*.h include/git2/sys/*.h)
# On Windows use specific platform sources # On Windows use specific platform sources
IF (WIN32 AND NOT CYGWIN) IF (WIN32 AND NOT CYGWIN)
ADD_DEFINITIONS(-DWIN32 -D_WIN32_WINNT=0x0501) 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) FILE(GLOB SRC_OS src/win32/*.c src/win32/*.h)
ELSEIF (AMIGA) ELSEIF (AMIGA)
ADD_DEFINITIONS(-DNO_ADDRINFO -DNO_READDIR_R -DNO_MMAP) ADD_DEFINITIONS(-DNO_ADDRINFO -DNO_READDIR_R -DNO_MMAP)
......
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