Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

build: Move OS-specific compat to their own folders

  • Loading branch information...
commit 678e9e045becdc5d75f2ce2259ed01c3531ee181 1 parent 932d1ba
Vicent Marti vmg authored
7 CMakeLists.txt
View
@@ -71,18 +71,19 @@ IF (THREADSAFE)
ADD_DEFINITIONS(-DGIT_THREADS)
ENDIF()
+ADD_DEFINITIONS(-D_FILE_OFFSET_BITS=64)
+
# Collect sourcefiles
-FILE(GLOB SRC src/*.c)
FILE(GLOB SRC_H include/git2/*.h)
# On Windows use specific platform sources
IF (WIN32 AND NOT CYGWIN)
ADD_DEFINITIONS(-DWIN32 -D_DEBUG -D_LIB)
FILE(GLOB SRC src/*.c src/win32/*.c)
+ELSE()
+ FILE(GLOB SRC src/*.c src/unix/*.c)
ENDIF ()
-ADD_DEFINITIONS(-D_FILE_OFFSET_BITS=64)
-
# Compile and link libgit2
ADD_LIBRARY(git2 ${SRC} ${SRC_ZLIB})
TARGET_LINK_LIBRARIES(git2 ${CMAKE_THREAD_LIBS_INIT})
4 src/common.h
View
@@ -23,8 +23,8 @@
# include <io.h>
# include <direct.h>
# include <windows.h>
-# include "msvc-compat.h"
-# include "mingw-compat.h"
+# include "win32/msvc-compat.h"
+# include "win32/mingw-compat.h"
# ifdef GIT_THREADS
# include "win32/pthread.h"
#endif
0  src/map_posix.c → src/unix/map.c
View
File renamed without changes
0  src/mingw-compat.h → src/win32/mingw-compat.h
View
File renamed without changes
0  src/msvc-compat.h → src/win32/msvc-compat.h
View
File renamed without changes
Please sign in to comment.
Something went wrong with that request. Please try again.