Skip to content

Commit e787897

Browse files
author
nullccxsy
committed
chore: refine dependency management in CI workflow
- Updated CMakeLists.txt to conditionally include `nanoarrow` and `nlohmann_json` based on their availability, improving flexibility in dependency handling.
1 parent c67d457 commit e787897

File tree

2 files changed

+5
-5
lines changed

2 files changed

+5
-5
lines changed

.github/workflows/test.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -83,7 +83,7 @@ jobs:
8383
- name: Install dependencies
8484
shell: cmd
8585
run: |
86-
vcpkg install zlib:x64-windows nlohmann-json:x64-windows arrow:x64-windows nanoarrow:x64-windows parquet:x64-windows
86+
vcpkg install zlib:x64-windows nlohmann-json:x64-windows nanoarrow:x64-windows
8787
- name: Build Iceberg
8888
shell: cmd
8989
run: |

src/iceberg/CMakeLists.txt

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -72,13 +72,13 @@ list(APPEND
7272
ZLIB::ZLIB)
7373
list(APPEND
7474
ICEBERG_STATIC_INSTALL_INTERFACE_LIBS
75-
"Iceberg::nanoarrow_static"
76-
"Iceberg::nlohmann_json"
75+
"$<IF:$<BOOL:${NANOARROW_VENDORED}>,Iceberg::nanoarrow_static,$<IF:$<TARGET_EXISTS:nanoarrow::nanoarrow_static>,nanoarrow::nanoarrow_static,nanoarrow::nanoarrow_shared>>"
76+
"$<IF:$<BOOL:${NLOHMANN_JSON_VENDORED}>,Iceberg::nlohmann_json,$<IF:$<TARGET_EXISTS:nlohmann_json::nlohmann_json>,nlohmann_json::nlohmann_json,nlohmann_json::nlohmann_json>>"
7777
"$<IF:$<BOOL:${SPDLOG_VENDORED}>,Iceberg::spdlog,spdlog::spdlog>")
7878
list(APPEND
7979
ICEBERG_SHARED_INSTALL_INTERFACE_LIBS
80-
"Iceberg::nanoarrow_shared"
81-
"Iceberg::nlohmann_json"
80+
"$<IF:$<BOOL:${NANOARROW_VENDORED}>,Iceberg::nanoarrow_shared,$<IF:$<TARGET_EXISTS:nanoarrow::nanoarrow_shared>,nanoarrow::nanoarrow_shared,nanoarrow::nanoarrow_static>>"
81+
"$<IF:$<BOOL:${NLOHMANN_JSON_VENDORED}>,Iceberg::nlohmann_json,$<IF:$<TARGET_EXISTS:nlohmann_json::nlohmann_json>,nlohmann_json::nlohmann_json,nlohmann_json::nlohmann_json>>"
8282
"$<IF:$<BOOL:${SPDLOG_VENDORED}>,Iceberg::spdlog,spdlog::spdlog>")
8383

8484
add_iceberg_lib(iceberg

0 commit comments

Comments
 (0)