Skip to content

Commit

Permalink
GH-33657: [C++] arrow-dataset.pc doesn't depend on parquet.pc without…
Browse files Browse the repository at this point in the history
… ARROW_PARQUET=ON (#33665)

# Which issue does this PR close?

Closes #33657

# Rationale for this change

If `arrow-dataset.pc` has `parquet` in `Requires` without `ARROW_PARQUET=ON`, the `arrow-dataset.pc` is invalid.

# What changes are included in this PR?

This PR includes `ARROW_PARQUET=ON` check to determine suitable `Requires` value.

# Are these changes tested?

Yes.

# Are there any user-facing changes?

Yes. `arrow-dataset.pc` without `ARROW_PARQUET=ON` users can use `arrow-dataset.pc` with this.
* Closes: #33657

Authored-by: Sutou Kouhei <kou@clear-code.com>
Signed-off-by: Sutou Kouhei <kou@clear-code.com>
  • Loading branch information
kou authored Jan 15, 2023
1 parent fee9588 commit b743ee9
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 1 deletion.
6 changes: 6 additions & 0 deletions cpp/src/arrow/dataset/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,12 @@ set(ARROW_DATASET_SRCS
scanner.cc
scan_node.cc)

if(ARROW_PARQUET)
set(ARROW_DATASET_PKG_CONFIG_REQUIRES parquet)
else()
set(ARROW_DATASET_PKG_CONFIG_REQUIRES arrow)
endif()

set(ARROW_DATASET_STATIC_LINK_LIBS)
set(ARROW_DATASET_SHARED_LINK_LIBS)
set(ARROW_DATASET_STATIC_INSTALL_INTERFACE_LIBS)
Expand Down
2 changes: 1 addition & 1 deletion cpp/src/arrow/dataset/arrow-dataset.pc.in
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,6 @@ libdir=@ARROW_PKG_CONFIG_LIBDIR@
Name: Apache Arrow Dataset
Description: Apache Arrow Dataset provides an API to read and write semantic datasets stored in different locations and formats.
Version: @ARROW_VERSION@
Requires: arrow parquet
Requires: @ARROW_DATASET_PKG_CONFIG_REQUIRES@
Libs: -L${libdir} -larrow_dataset
Cflags.private: -DARROW_DS_STATIC

0 comments on commit b743ee9

Please sign in to comment.