Skip to content

Commit 13784ad

Browse files
author
xiao.dong
committed
feat: add zlib dependency
1 parent 29b887d commit 13784ad

File tree

1 file changed

+20
-1
lines changed

1 file changed

+20
-1
lines changed

cmake_modules/IcebergThirdpartyToolchain.cmake

Lines changed: 20 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -86,6 +86,9 @@ function(resolve_arrow_dependency)
8686
set(ARROW_DEPENDENCY_SOURCE
8787
"BUNDLED"
8888
CACHE STRING "" FORCE)
89+
set(ARROW_WITH_ZLIB
90+
ON
91+
CACHE BOOL "" FORCE)
8992

9093
fetchcontent_declare(VendoredArrow
9194
${FC_DECLARE_COMMON_OPTIONS}
@@ -211,7 +214,6 @@ function(resolve_avro_dependency)
211214
if(Snappy_FOUND)
212215
list(APPEND ICEBERG_SYSTEM_DEPENDENCIES Snappy)
213216
endif()
214-
list(APPEND ICEBERG_SYSTEM_DEPENDENCIES ZLIB)
215217
else()
216218
set(AVRO_VENDORED FALSE)
217219
list(APPEND ICEBERG_SYSTEM_DEPENDENCIES Avro)
@@ -285,3 +287,20 @@ function(resolve_nlohmann_json_dependency)
285287
endfunction()
286288

287289
resolve_nlohmann_json_dependency()
290+
291+
# ----------------------------------------------------------------------
292+
# zlib
293+
294+
function(resolve_zlib_dependency)
295+
# use system zlib, zlib is required by arrow and avro
296+
find_package(ZLIB REQUIRED)
297+
if(ZLIB_FOUND)
298+
list(APPEND ICEBERG_SYSTEM_DEPENDENCIES ZLIB)
299+
message(STATUS "ZLIB_FOUND")
300+
message(STATUS "ZLIB_LIBRARIES: ${ZLIB_LIBRARIES}")
301+
message(STATUS "ZLIB_INCLUDE_DIR: ${ZLIB_INCLUDE_DIR}")
302+
endif()
303+
304+
endfunction()
305+
306+
resolve_zlib_dependency()

0 commit comments

Comments
 (0)