summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorEdward Thomson <ethomson@edwardthomson.com>2020-04-08 11:26:54 +0100
committerEdward Thomson <ethomson@edwardthomson.com>2020-04-08 11:26:54 +0100
commit639df9b189ea489f30a1bb6b0c3d67c575262129 (patch)
tree94d04e7e3d64b85bee707446d180cacaead21ed8
parent6540600bb554d2bd49650174fc2cd45317fee287 (diff)
downloadlibgit2-ethomson/middleware.tar.gz
util: add more to the utility libraryethomson/middleware
-rw-r--r--src/CMakeLists.txt16
1 files changed, 12 insertions, 4 deletions
diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt
index 118bb5f1f..42f4b5ca4 100644
--- a/src/CMakeLists.txt
+++ b/src/CMakeLists.txt
@@ -289,16 +289,24 @@ IF (USE_LEAK_CHECKER STREQUAL "valgrind")
ADD_DEFINITIONS(-DVALGRIND)
ENDIF()
-FILE(GLOB SRC_UTIL alloc.c alloc.h
- buffer.c buffer.h buf_text.c buf_text.h
- strarray.c strarray.h util.c util.h
+FILE(GLOB SRC_UTIL alloc.c alloc.h buffer.c buffer.h buf_text.c buf_text.h
+ futils.c futils.h hash.c hash.h ${SRC_SHA1} path.c path.h
+ pool.c pool.h posix.c posix.h strarray.c strarray.h
+ strmap.c strmap.h tsort.c util.c util.h vector.c vector.h
allocators/*.c allocators/*.h)
+IF (WIN32 AND NOT CYGWIN)
+ELSE()
+ FILE(GLOB SRC_UTIL_OS
+ unix/map.c unix/posix.h unix/pthread.h unix/realpath.c)
+ENDIF()
+
FILE(GLOB SRC_GIT2 *.c *.h
allocators/*.c allocators/*.h
streams/*.c streams/*.h
transports/*.c transports/*.h
xdiff/*.c xdiff/*.h)
+
IF(APPLE)
# The old Secure Transport API has been deprecated in macOS 10.15.
SET_SOURCE_FILES_PROPERTIES(streams/stransport.c PROPERTIES COMPILE_FLAGS -Wno-deprecated)
@@ -326,7 +334,7 @@ CONFIGURE_FILE(features.h.in git2/sys/features.h)
# Utility functions shared with other parts of the libgit2
-SET(UTIL_SOURCES ${SRC_UTIL})
+SET(UTIL_SOURCES ${SRC_UTIL} ${SRC_UTIL_OS})
ADD_LIBRARY(git2util OBJECT ${UTIL_SOURCES})
LIST(APPEND UTIL_OBJECTS $<TARGET_OBJECTS:git2util>)