summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDavid Brooks <dave@bcs.co.nz>2019-05-21 20:17:48 +1200
committerDavid Brooks <dave@bcs.co.nz>2019-05-21 20:17:48 +1200
commit2c2e924bd9e13a7b5883a0697353e435de08c9c0 (patch)
treeb48b7297b33dd5ccd7b515ce8ce72a9367f52525
parent06dbf7340767b8af71591c568f4d87f646a254e8 (diff)
downloadlibgit2-2c2e924bd9e13a7b5883a0697353e435de08c9c0.tar.gz
We still need to update pkgconfig variables when zlib is unbundled (#5079).
-rw-r--r--src/CMakeLists.txt5
1 files changed, 5 insertions, 0 deletions
diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt
index c23e019a7..246996277 100644
--- a/src/CMakeLists.txt
+++ b/src/CMakeLists.txt
@@ -327,6 +327,11 @@ IF(NOT USE_BUNDLED_ZLIB)
IF(ZLIB_FOUND)
LIST(APPEND LIBGIT2_SYSTEM_INCLUDES ${ZLIB_INCLUDE_DIRS})
LIST(APPEND LIBGIT2_LIBS ${ZLIB_LIBRARIES})
+ IF(APPLE OR CMAKE_SYSTEM_NAME MATCHES "FreeBSD")
+ LIST(APPEND LIBGIT2_PC_LIBS "-lz")
+ ELSE()
+ LIST(APPEND LIBGIT2_PC_REQUIRES "zlib")
+ ENDIF()
ADD_FEATURE_INFO(zlib ON "using system zlib")
ELSE()
MESSAGE(STATUS "zlib was not found; using bundled 3rd-party sources." )