@@ -55,6 +55,7 @@ configure_file (
5555 "${CMAKE_BINARY_DIR} /src/zlib-1.2.11/zconf.h"
5656 COPYONLY
5757)
58+ set (ZLIB_INCLUDE_DIRS "" )
5859if (ENABLE_ZLIB MATCHES "SYSTEM|AUTO" )
5960 message (STATUS "Searching for zlib CMake packages" )
6061 include (FindZLIB)
@@ -74,13 +75,12 @@ if (ENABLE_ZLIB MATCHES "SYSTEM|AUTO")
7475 endif ()
7576endif ()
7677
77- set (PRIVATE_ZLIB_INCLUDES "" )
7878if ( (ENABLE_ZLIB STREQUAL "BUNDLED" )
7979 OR (ENABLE_ZLIB STREQUAL "AUTO" AND NOT ZLIB_FOUND) )
8080 message (STATUS "Enabling zlib compression (bundled)" )
8181 set (SOURCES ${SOURCES} ${ZLIB_SOURCES} )
8282 set (
83- PRIVATE_ZLIB_INCLUDES
83+ ZLIB_INCLUDE_DIRS
8484 "${SOURCE_DIR} /src/zlib-1.2.11"
8585 "${CMAKE_BINARY_DIR} /src/zlib-1.2.11"
8686 )
@@ -729,7 +729,7 @@ add_library (mongoc_shared SHARED ${SOURCES} ${HEADERS} ${HEADERS_FORWARDING})
729729set_target_properties (mongoc_shared PROPERTIES CMAKE_CXX_VISIBILITY_PRESET hidden)
730730target_link_libraries (mongoc_shared PRIVATE ${LIBRARIES} PUBLIC ${BSON_LIBRARIES} )
731731target_include_directories (mongoc_shared BEFORE PUBLIC ${MONGOC_INTERNAL_INCLUDE_DIRS} )
732- target_include_directories (mongoc_shared PRIVATE ${PRIVATE_ZLIB_INCLUDES } )
732+ target_include_directories (mongoc_shared PRIVATE ${ZLIB_INCLUDE_DIRS } )
733733target_include_directories (mongoc_shared PRIVATE ${LIBMONGOCRYPT_INCLUDE_DIRECTORIES} )
734734if (MONGOC_ENABLE_MONGODB_AWS_AUTH)
735735 target_include_directories (mongoc_shared PRIVATE "${CMAKE_CURRENT_SOURCE_DIR} /../kms-message/src" )
@@ -753,7 +753,7 @@ if (MONGOC_ENABLE_STATIC_BUILD)
753753 message ("Adding -fPIC to compilation of mongoc_static components" )
754754 endif ()
755755 target_include_directories (mongoc_static BEFORE PUBLIC ${MONGOC_INTERNAL_INCLUDE_DIRS} )
756- target_include_directories (mongoc_static PRIVATE ${PRIVATE_ZLIB_INCLUDES } )
756+ target_include_directories (mongoc_static PRIVATE ${ZLIB_INCLUDE_DIRS } )
757757 target_include_directories (mongoc_static PRIVATE ${LIBMONGOCRYPT_INCLUDE_DIRECTORIES} )
758758 if (MONGOC_ENABLE_MONGODB_AWS_AUTH)
759759 target_include_directories (mongoc_static PRIVATE "${CMAKE_CURRENT_SOURCE_DIR} /../kms-message/src" )
0 commit comments