File tree Expand file tree Collapse file tree 2 files changed +40
-1
lines changed Expand file tree Collapse file tree 2 files changed +40
-1
lines changed Original file line number Diff line number Diff line change @@ -198,3 +198,38 @@ endfunction()
198198if (ICEBERG_AVRO)
199199 resolve_avro_dependency()
200200endif ()
201+
202+ # ----------------------------------------------------------------------
203+ # Apache Iceberg (Rust)
204+
205+ function (resolve_iceberg_c_dependency)
206+ prepare_fetchcontent()
207+
208+ fetchcontent_declare(IcebergC
209+ ${FC_DECLARE_COMMON_OPTIONS}
210+ GIT_REPOSITORY https://github.com/lidavidm/iceberg-rust.git
211+ GIT_TAG add-c-binding
212+ SOURCE_SUBDIR
213+ bindings/c
214+ FIND_PACKAGE_ARGS)
215+
216+ fetchcontent_makeavailable(IcebergC)
217+
218+ if (icebergc_SOURCE_DIR)
219+ message (STATUS "Using vendored Iceberg C library" )
220+ set (ICEBERG_C_VENDORED TRUE )
221+ else ()
222+ message (STATUS "Using system Iceberg C library" )
223+ set (ICEBERG_C_VENDORED FALSE )
224+ list (APPEND ICEBERG_SYSTEM_DEPENDENCIES IcebergC)
225+ endif ()
226+
227+ set (ICEBERG_SYSTEM_DEPENDENCIES
228+ ${ICEBERG_SYSTEM_DEPENDENCIES}
229+ PARENT_SCOPE)
230+ set (ICEBERG_C_VENDORED
231+ ${ICEBERG_C_VENDORED}
232+ PARENT_SCOPE)
233+ endfunction ()
234+
235+ resolve_iceberg_c_dependency()
Original file line number Diff line number Diff line change @@ -21,7 +21,11 @@ add_iceberg_lib(iceberg
2121 SOURCES
2222 ${ICEBERG_SOURCES}
2323 PRIVATE_INCLUDES
24- ${ICEBERG_INCLUDES} )
24+ ${ICEBERG_INCLUDES}
25+ SHARED_LINK_LIBS
26+ IcebergC::iceberg_c_shared
27+ STATIC_LINK_LIBS
28+ IcebergC::iceberg_c_static)
2529
2630iceberg_install_all_headers(iceberg)
2731
You can’t perform that action at this time.
0 commit comments