diff options
author | Vicent Marti <tanoku@gmail.com> | 2011-07-03 13:33:43 +0200 |
---|---|---|
committer | Vicent Marti <tanoku@gmail.com> | 2011-07-03 13:33:43 +0200 |
commit | 678e9e045becdc5d75f2ce2259ed01c3531ee181 (patch) | |
tree | 67e3f2a6455e5b54edc6927a4df6665d5724789b | |
parent | 932d1baf294aaacfd5a99e7758a3c08d8ffc22ab (diff) | |
download | libgit2-678e9e045becdc5d75f2ce2259ed01c3531ee181.tar.gz |
build: Move OS-specific compat to their own folders
-rw-r--r-- | CMakeLists.txt | 7 | ||||
-rw-r--r-- | src/common.h | 4 | ||||
-rw-r--r-- | src/unix/map.c (renamed from src/map_posix.c) | 0 | ||||
-rw-r--r-- | src/win32/mingw-compat.h (renamed from src/mingw-compat.h) | 0 | ||||
-rw-r--r-- | src/win32/msvc-compat.h (renamed from src/msvc-compat.h) | 0 |
5 files changed, 6 insertions, 5 deletions
diff --git a/CMakeLists.txt b/CMakeLists.txt index 30df62d79..82208dc12 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -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}) diff --git a/src/common.h b/src/common.h index b6d8ae3a4..e1e7f0035 100644 --- a/src/common.h +++ b/src/common.h @@ -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 diff --git a/src/map_posix.c b/src/unix/map.c index 1f50bcf2e..1f50bcf2e 100644 --- a/src/map_posix.c +++ b/src/unix/map.c diff --git a/src/mingw-compat.h b/src/win32/mingw-compat.h index 64d780b16..64d780b16 100644 --- a/src/mingw-compat.h +++ b/src/win32/mingw-compat.h diff --git a/src/msvc-compat.h b/src/win32/msvc-compat.h index df3e62d11..df3e62d11 100644 --- a/src/msvc-compat.h +++ b/src/win32/msvc-compat.h |