mirror of
https://git.proxmox.com/git/libgit2
synced 2025-05-04 19:50:19 +00:00
build: Move OS-specific compat to their own folders
This commit is contained in:
parent
932d1baf29
commit
678e9e045b
@ -71,18 +71,19 @@ IF (THREADSAFE)
|
|||||||
ADD_DEFINITIONS(-DGIT_THREADS)
|
ADD_DEFINITIONS(-DGIT_THREADS)
|
||||||
ENDIF()
|
ENDIF()
|
||||||
|
|
||||||
|
ADD_DEFINITIONS(-D_FILE_OFFSET_BITS=64)
|
||||||
|
|
||||||
# Collect sourcefiles
|
# Collect sourcefiles
|
||||||
FILE(GLOB SRC src/*.c)
|
|
||||||
FILE(GLOB SRC_H include/git2/*.h)
|
FILE(GLOB SRC_H include/git2/*.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_DEBUG -D_LIB)
|
ADD_DEFINITIONS(-DWIN32 -D_DEBUG -D_LIB)
|
||||||
FILE(GLOB SRC src/*.c src/win32/*.c)
|
FILE(GLOB SRC src/*.c src/win32/*.c)
|
||||||
|
ELSE()
|
||||||
|
FILE(GLOB SRC src/*.c src/unix/*.c)
|
||||||
ENDIF ()
|
ENDIF ()
|
||||||
|
|
||||||
ADD_DEFINITIONS(-D_FILE_OFFSET_BITS=64)
|
|
||||||
|
|
||||||
# Compile and link libgit2
|
# Compile and link libgit2
|
||||||
ADD_LIBRARY(git2 ${SRC} ${SRC_ZLIB})
|
ADD_LIBRARY(git2 ${SRC} ${SRC_ZLIB})
|
||||||
TARGET_LINK_LIBRARIES(git2 ${CMAKE_THREAD_LIBS_INIT})
|
TARGET_LINK_LIBRARIES(git2 ${CMAKE_THREAD_LIBS_INIT})
|
||||||
|
@ -23,8 +23,8 @@
|
|||||||
# include <io.h>
|
# include <io.h>
|
||||||
# include <direct.h>
|
# include <direct.h>
|
||||||
# include <windows.h>
|
# include <windows.h>
|
||||||
# include "msvc-compat.h"
|
# include "win32/msvc-compat.h"
|
||||||
# include "mingw-compat.h"
|
# include "win32/mingw-compat.h"
|
||||||
# ifdef GIT_THREADS
|
# ifdef GIT_THREADS
|
||||||
# include "win32/pthread.h"
|
# include "win32/pthread.h"
|
||||||
#endif
|
#endif
|
||||||
|
Loading…
Reference in New Issue
Block a user