Skip to content
7 changes: 4 additions & 3 deletions cmake_modules/IcebergThirdpartyToolchain.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -260,7 +260,8 @@ function(resolve_arrow_dependency)
URL ${ARROW_SOURCE_URL}
URL_HASH "SHA256=${ICEBERG_ARROW_BUILD_SHA256_CHECKSUM}"
PATCH_COMMAND ${ARROW_PATCH_COMMAND} SOURCE_SUBDIR cpp
FIND_PACKAGE_ARGS CONFIG)
FIND_PACKAGE_ARGS ${ICEBERG_ARROW_BUILD_VERSION}
CONFIG)

fetchcontent_makeavailable(Arrow)

Expand Down Expand Up @@ -330,8 +331,8 @@ function(resolve_arrow_dependency)
endif()
else()
set(ARROW_VENDORED FALSE)
find_package(Arrow CONFIG REQUIRED)
find_package(Parquet CONFIG REQUIRED)
find_package(Arrow ${ICEBERG_ARROW_BUILD_VERSION} CONFIG REQUIRED)
find_package(Parquet ${ICEBERG_ARROW_BUILD_VERSION} CONFIG REQUIRED)
list(APPEND ICEBERG_SYSTEM_DEPENDENCIES Arrow Parquet)
endif()

Expand Down
8 changes: 7 additions & 1 deletion mkdocs/docs/getting-started.md
Original file line number Diff line number Diff line change
Expand Up @@ -50,14 +50,20 @@ cmake --install build

### Bundle Library (with vendored dependencies)

To build Arrow from source even when it is already installed, set
`FETCHCONTENT_TRY_FIND_PACKAGE_MODE=NEVER` to skip FetchContent's installed-package lookup.

```bash
cmake -S . -B build -G Ninja -DCMAKE_INSTALL_PREFIX=/path/to/install -DICEBERG_BUILD_BUNDLE=ON
cmake -S . -B build -G Ninja -DCMAKE_INSTALL_PREFIX=/path/to/install -DICEBERG_BUILD_BUNDLE=ON -DFETCHCONTENT_TRY_FIND_PACKAGE_MODE=NEVER
cmake --build build
cmake --install build
```

### Bundle Library (with provided Apache Arrow)

Provided Arrow and Parquet packages must meet the minimum version set by
`ICEBERG_ARROW_BUILD_VERSION`.

```bash
cmake -S . -B build -G Ninja -DCMAKE_INSTALL_PREFIX=/path/to/install -DCMAKE_PREFIX_PATH=/path/to/arrow -DICEBERG_BUILD_BUNDLE=ON
cmake --build build
Expand Down
2 changes: 2 additions & 0 deletions src/iceberg/iceberg-config.cmake.in
Original file line number Diff line number Diff line change
Expand Up @@ -44,6 +44,8 @@ set(ICEBERG_SYSTEM_DEPENDENCIES "@ICEBERG_SYSTEM_DEPENDENCIES@")

# Extra args forwarded to find_dependency() for specific dependencies.
set(ICEBERG_FIND_EXTRA_ARGS_AWSSDK "@ICEBERG_FIND_EXTRA_ARGS_AWSSDK@")
set(ICEBERG_FIND_EXTRA_ARGS_Arrow "@ICEBERG_ARROW_BUILD_VERSION@;CONFIG")
set(ICEBERG_FIND_EXTRA_ARGS_Parquet "@ICEBERG_ARROW_BUILD_VERSION@;CONFIG")

include(CMakeFindDependencyMacro)

Expand Down
Loading