This is an automated email from the ASF dual-hosted git repository.
kou pushed a commit to branch main
in repository https://gitbox.apache.org/repos/asf/arrow.git
The following commit(s) were added to refs/heads/main by this push:
new 5720f7c4f3 GH-37408: [C++] Install arrow-compute.pc only when
ARROW_COMPUTE=ON (#37409)
5720f7c4f3 is described below
commit 5720f7c4f31c5985b130462c312c5da6c971e9e4
Author: Sutou Kouhei <[email protected]>
AuthorDate: Tue Aug 29 09:25:02 2023 +0900
GH-37408: [C++] Install arrow-compute.pc only when ARROW_COMPUTE=ON (#37409)
### Rationale for this change
GH-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: #37408
Authored-by: Sutou Kouhei <[email protected]>
Signed-off-by: Sutou Kouhei <[email protected]>
---
cpp/src/arrow/compute/CMakeLists.txt | 6 ++++--
cpp/src/arrow/compute/arrow-compute.pc.in | 2 +-
2 files changed, 5 insertions(+), 3 deletions(-)
diff --git a/cpp/src/arrow/compute/CMakeLists.txt
b/cpp/src/arrow/compute/CMakeLists.txt
index 1d71c14dca..1134e0a98a 100644
--- a/cpp/src/arrow/compute/CMakeLists.txt
+++ b/cpp/src/arrow/compute/CMakeLists.txt
@@ -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
diff --git a/cpp/src/arrow/compute/arrow-compute.pc.in
b/cpp/src/arrow/compute/arrow-compute.pc.in
index 35bfb51683..a94a0261cc 100644
--- a/cpp/src/arrow/compute/arrow-compute.pc.in
+++ b/cpp/src/arrow/compute/arrow-compute.pc.in
@@ -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