File tree Expand file tree Collapse file tree 2 files changed +11
-3
lines changed Expand file tree Collapse file tree 2 files changed +11
-3
lines changed Original file line number Diff line number Diff line change @@ -452,9 +452,7 @@ IF (ZLIB_FOUND)
452
452
ENDIF ()
453
453
ELSE ()
454
454
MESSAGE (STATUS "zlib was not found; using bundled 3rd-party sources." )
455
- INCLUDE_DIRECTORIES ("${CMAKE_SOURCE_DIR} /deps/zlib" )
456
- ADD_DEFINITIONS (-DNO_VIZ -DSTDC -DNO_GZIP )
457
- FILE (GLOB SRC_ZLIB "${CMAKE_SOURCE_DIR} /deps/zlib/*.c" "${CMAKE_SOURCE_DIR} /deps/zlib/*.h" )
455
+ SET (USE_BUNDLED_ZLIB 1 )
458
456
ENDIF ()
459
457
460
458
# Optional external dependency: libssh2
@@ -580,6 +578,12 @@ IF(USE_BUNDLED_REGEX)
580
578
LIST (APPEND LIBGIT2_LIBS regex )
581
579
ENDIF ()
582
580
581
+ IF (USE_BUNDLED_ZLIB )
582
+ ADD_SUBDIRECTORY ("${CMAKE_SOURCE_DIR} /deps/zlib" )
583
+ INCLUDE_DIRECTORIES ("${CMAKE_SOURCE_DIR} /deps/zlib" )
584
+ LIST (APPEND LIBGIT2_LIBS zlib )
585
+ ENDIF ()
586
+
583
587
IF (USE_BUNDLED_HTTP_PARSER )
584
588
ADD_SUBDIRECTORY ("${CMAKE_SOURCE_DIR} /deps/http-parser" )
585
589
INCLUDE_DIRECTORIES ("${CMAKE_SOURCE_DIR} /deps/http-parser" )
Original file line number Diff line number Diff line change
1
+ ADD_DEFINITIONS (-DNO_VIZ -DSTDC -DNO_GZIP )
2
+ FILE (GLOB SRC_ZLIB "*.c" "*.h" )
3
+ INCLUDE_DIRECTORIES ("." )
4
+ ADD_LIBRARY (zlib STATIC ${SRC_ZLIB} )
You can’t perform that action at this time.
0 commit comments