Skip to content

Commit

Permalink
apacheGH-37408: [C++] Install arrow-compute.pc only when ARROW_COMPUT…
Browse files Browse the repository at this point in the history
…E=ON (apache#37409)

### Rationale for this change

apacheGH-34295  changed meaning of `ARROW_COMPUTE`. `ARROW_COMPUTE=ON` means that "all compute kerenels are enabled" not "compute module is enabled".

`arrow-compute.pc`  is for detecting `ARROW_COMPUTE`. So `arrow-compute.pc` should be installed only when `ARROW_COMPUTE=ON`.

### What changes are included in this PR?

Add missing `if (ARROW_COMPUTE)`.

### Are these changes tested?

Yes.

### Are there any user-facing changes?

Yes.
* Closes: apache#37408

Authored-by: Sutou Kouhei <kou@clear-code.com>
Signed-off-by: Sutou Kouhei <kou@clear-code.com>
  • Loading branch information
kou authored and loicalleyne committed Nov 13, 2023
1 parent 60ee1f6 commit 76ec27b
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 3 deletions.
6 changes: 4 additions & 2 deletions cpp/src/arrow/compute/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -19,8 +19,10 @@ add_custom_target(arrow_compute)

arrow_install_all_headers("arrow/compute")

# pkg-config support
arrow_add_pkg_config("arrow-compute")
if(ARROW_COMPUTE)
# pkg-config support
arrow_add_pkg_config("arrow-compute")
endif()

#
# Unit tests
Expand Down
2 changes: 1 addition & 1 deletion cpp/src/arrow/compute/arrow-compute.pc.in
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,6 @@ includedir=@ARROW_PKG_CONFIG_INCLUDEDIR@
libdir=@ARROW_PKG_CONFIG_LIBDIR@

Name: Apache Arrow Compute
Description: Compute modules for Apache Arrow
Description: All compute kernels for Apache Arrow
Version: @ARROW_VERSION@
Requires: arrow

0 comments on commit 76ec27b

Please sign in to comment.