From a2dab7e0e8258d9d1eb50901123a4e23218f74d9 Mon Sep 17 00:00:00 2001 From: Jason Lowe Date: Fri, 10 Dec 2021 18:14:53 -0600 Subject: [PATCH] Add zlib to cudfjni link when using static libcudf library dependency --- java/src/main/native/CMakeLists.txt | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/java/src/main/native/CMakeLists.txt b/java/src/main/native/CMakeLists.txt index 327445bdf0e..0ed2f31bfac 100755 --- a/java/src/main/native/CMakeLists.txt +++ b/java/src/main/native/CMakeLists.txt @@ -117,6 +117,12 @@ set(CUDF_LIB_HINTS HINTS "$ENV{CUDF_ROOT}" "$ENV{CUDF_ROOT}/lib" "$ENV{CONDA_PRE find_library(CUDF_LIB "cudf" REQUIRED HINTS ${CUDF_LIB_HINTS}) +# ################################################################################################## +# * ZLIB ------------------------------------------------------------------------------------------ + +# find zlib +rapids_find_package(ZLIB REQUIRED) + # ################################################################################################## # * RMM ------------------------------------------------------------------------------------------- @@ -321,7 +327,7 @@ target_compile_definitions(cudfjni PUBLIC SPDLOG_ACTIVE_LEVEL=SPDLOG_LEVEL_${RMM set(CUDF_LINK ${CUDF_LIB}) if(CUDF_JNI_LIBCUDF_STATIC) - set(CUDF_LINK -Wl,--whole-archive ${CUDF_LIB} -Wl,--no-whole-archive) + set(CUDF_LINK -Wl,--whole-archive ${CUDF_LIB} -Wl,--no-whole-archive ZLIB::ZLIB) endif() target_link_libraries(