diff --git a/cpp/CMakeLists.txt b/cpp/CMakeLists.txt index 23e0ba311f3..0ae86cba4b8 100644 --- a/cpp/CMakeLists.txt +++ b/cpp/CMakeLists.txt @@ -104,6 +104,21 @@ include(ExternalProject) include(FindPackageHandleStandardArgs) include(GNUInstallDirs) +if(IS_ABSOLUTE "${CMAKE_INSTALL_BINDIR}") + set(ARROW_PKG_CONFIG_BINDIR "${CMAKE_INSTALL_BINDIR}") +else() + set(ARROW_PKG_CONFIG_BINDIR "\${prefix}/${CMAKE_INSTALL_BINDIR}") +endif() +if(IS_ABSOLUTE "${CMAKE_INSTALL_INCLUDEDIR}") + set(ARROW_PKG_CONFIG_INCLUDEDIR "${CMAKE_INSTALL_INCLUDEDIR}") +else() + set(ARROW_PKG_CONFIG_INCLUDEDIR "\${prefix}/${CMAKE_INSTALL_INCLUDEDIR}") +endif() +if(IS_ABSOLUTE "${CMAKE_INSTALL_LIBDIR}") + set(ARROW_PKG_CONFIG_LIBDIR "${CMAKE_INSTALL_LIBDIR}") +else() + set(ARROW_PKG_CONFIG_LIBDIR "\${prefix}/${CMAKE_INSTALL_LIBDIR}") +endif() set(BUILD_SUPPORT_DIR "${CMAKE_SOURCE_DIR}/build-support") diff --git a/cpp/src/arrow/adapters/orc/arrow-orc.pc.in b/cpp/src/arrow/adapters/orc/arrow-orc.pc.in index eec59ccc52e..87e214f3e4e 100644 --- a/cpp/src/arrow/adapters/orc/arrow-orc.pc.in +++ b/cpp/src/arrow/adapters/orc/arrow-orc.pc.in @@ -15,8 +15,9 @@ # specific language governing permissions and limitations # under the License. -libdir=@CMAKE_INSTALL_FULL_LIBDIR@ -includedir=@CMAKE_INSTALL_FULL_INCLUDEDIR@ +prefix=@CMAKE_INSTALL_PREFIX@ +includedir=@ARROW_PKG_CONFIG_INCLUDEDIR@ +libdir=@ARROW_PKG_CONFIG_LIBDIR@ Name: Apache Arrow ORC Description: ORC modules for Apache Arrow diff --git a/cpp/src/arrow/adapters/tensorflow/arrow-tensorflow.pc.in b/cpp/src/arrow/adapters/tensorflow/arrow-tensorflow.pc.in index a2b38a0a011..2787f436e71 100644 --- a/cpp/src/arrow/adapters/tensorflow/arrow-tensorflow.pc.in +++ b/cpp/src/arrow/adapters/tensorflow/arrow-tensorflow.pc.in @@ -15,8 +15,9 @@ # specific language governing permissions and limitations # under the License. -libdir=@CMAKE_INSTALL_FULL_LIBDIR@ -includedir=@CMAKE_INSTALL_FULL_INCLUDEDIR@ +prefix=@CMAKE_INSTALL_PREFIX@ +includedir=@ARROW_PKG_CONFIG_INCLUDEDIR@ +libdir=@ARROW_PKG_CONFIG_LIBDIR@ Name: Apache Arrow Tensorflow Description: TensorFlow modules for Apache Arrow diff --git a/cpp/src/arrow/arrow-testing.pc.in b/cpp/src/arrow/arrow-testing.pc.in index 39c08fcf043..5a991e796d8 100644 --- a/cpp/src/arrow/arrow-testing.pc.in +++ b/cpp/src/arrow/arrow-testing.pc.in @@ -15,8 +15,10 @@ # specific language governing permissions and limitations # under the License. -libdir=@CMAKE_INSTALL_FULL_LIBDIR@ -includedir=@CMAKE_INSTALL_FULL_INCLUDEDIR@ +prefix=@CMAKE_INSTALL_PREFIX@ +includedir=@ARROW_PKG_CONFIG_INCLUDEDIR@ +libdir=@ARROW_PKG_CONFIG_LIBDIR@ + gtest_includedir=@GTEST_INCLUDE_DIR@ Name: Apache Arrow testing diff --git a/cpp/src/arrow/arrow.pc.in b/cpp/src/arrow/arrow.pc.in index ef995fdc3db..3a5710ab6b8 100644 --- a/cpp/src/arrow/arrow.pc.in +++ b/cpp/src/arrow/arrow.pc.in @@ -15,8 +15,9 @@ # specific language governing permissions and limitations # under the License. -libdir=@CMAKE_INSTALL_FULL_LIBDIR@ -includedir=@CMAKE_INSTALL_FULL_INCLUDEDIR@ +prefix=@CMAKE_INSTALL_PREFIX@ +includedir=@ARROW_PKG_CONFIG_INCLUDEDIR@ +libdir=@ARROW_PKG_CONFIG_LIBDIR@ so_version=@ARROW_SO_VERSION@ abi_version=@ARROW_SO_VERSION@ diff --git a/cpp/src/arrow/compute/arrow-compute.pc.in b/cpp/src/arrow/compute/arrow-compute.pc.in index bbdb12c4700..35bfb516837 100644 --- a/cpp/src/arrow/compute/arrow-compute.pc.in +++ b/cpp/src/arrow/compute/arrow-compute.pc.in @@ -15,6 +15,10 @@ # specific language governing permissions and limitations # under the License. +prefix=@CMAKE_INSTALL_PREFIX@ +includedir=@ARROW_PKG_CONFIG_INCLUDEDIR@ +libdir=@ARROW_PKG_CONFIG_LIBDIR@ + Name: Apache Arrow Compute Description: Compute modules for Apache Arrow Version: @ARROW_VERSION@ diff --git a/cpp/src/arrow/csv/arrow-csv.pc.in b/cpp/src/arrow/csv/arrow-csv.pc.in index 9c69c6923a8..99571966f0e 100644 --- a/cpp/src/arrow/csv/arrow-csv.pc.in +++ b/cpp/src/arrow/csv/arrow-csv.pc.in @@ -15,8 +15,9 @@ # specific language governing permissions and limitations # under the License. -libdir=@CMAKE_INSTALL_FULL_LIBDIR@ -includedir=@CMAKE_INSTALL_FULL_INCLUDEDIR@ +prefix=@CMAKE_INSTALL_PREFIX@ +includedir=@ARROW_PKG_CONFIG_INCLUDEDIR@ +libdir=@ARROW_PKG_CONFIG_LIBDIR@ Name: Apache Arrow CSV Description: CSV reader module for Apache Arrow diff --git a/cpp/src/arrow/dataset/arrow-dataset.pc.in b/cpp/src/arrow/dataset/arrow-dataset.pc.in index c03aad3787b..7c433321c13 100644 --- a/cpp/src/arrow/dataset/arrow-dataset.pc.in +++ b/cpp/src/arrow/dataset/arrow-dataset.pc.in @@ -15,8 +15,9 @@ # specific language governing permissions and limitations # under the License. -libdir=@CMAKE_INSTALL_FULL_LIBDIR@ -includedir=@CMAKE_INSTALL_FULL_INCLUDEDIR@ +prefix=@CMAKE_INSTALL_PREFIX@ +includedir=@ARROW_PKG_CONFIG_INCLUDEDIR@ +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. diff --git a/cpp/src/arrow/engine/arrow-substrait.pc.in b/cpp/src/arrow/engine/arrow-substrait.pc.in index 82aadbc3b5a..77ac510933f 100644 --- a/cpp/src/arrow/engine/arrow-substrait.pc.in +++ b/cpp/src/arrow/engine/arrow-substrait.pc.in @@ -15,8 +15,9 @@ # specific language governing permissions and limitations # under the License. -libdir=@CMAKE_INSTALL_FULL_LIBDIR@ -includedir=@CMAKE_INSTALL_FULL_INCLUDEDIR@ +prefix=@CMAKE_INSTALL_PREFIX@ +includedir=@ARROW_PKG_CONFIG_INCLUDEDIR@ +libdir=@ARROW_PKG_CONFIG_LIBDIR@ Name: Apache Arrow Substrait Consumer Description: Apache Arrow's Substrait Consumer. diff --git a/cpp/src/arrow/filesystem/arrow-filesystem.pc.in b/cpp/src/arrow/filesystem/arrow-filesystem.pc.in index 4fcc6244f9d..8a2c05f7853 100644 --- a/cpp/src/arrow/filesystem/arrow-filesystem.pc.in +++ b/cpp/src/arrow/filesystem/arrow-filesystem.pc.in @@ -15,8 +15,9 @@ # specific language governing permissions and limitations # under the License. -libdir=@CMAKE_INSTALL_FULL_LIBDIR@ -includedir=@CMAKE_INSTALL_FULL_INCLUDEDIR@ +prefix=@CMAKE_INSTALL_PREFIX@ +includedir=@ARROW_PKG_CONFIG_INCLUDEDIR@ +libdir=@ARROW_PKG_CONFIG_LIBDIR@ Name: Apache Arrow Filesystem Description: Filesystem API for accessing local and remote filesystems diff --git a/cpp/src/arrow/flight/arrow-flight-testing.pc.in b/cpp/src/arrow/flight/arrow-flight-testing.pc.in index 6946b84f743..0b7224a9ce7 100644 --- a/cpp/src/arrow/flight/arrow-flight-testing.pc.in +++ b/cpp/src/arrow/flight/arrow-flight-testing.pc.in @@ -15,8 +15,9 @@ # specific language governing permissions and limitations # under the License. -libdir=@CMAKE_INSTALL_FULL_LIBDIR@ -includedir=@CMAKE_INSTALL_FULL_INCLUDEDIR@ +prefix=@CMAKE_INSTALL_PREFIX@ +includedir=@ARROW_PKG_CONFIG_INCLUDEDIR@ +libdir=@ARROW_PKG_CONFIG_LIBDIR@ Name: Apache Arrow Flight testing Description: Library for testing Apache Arrow Flight related programs. diff --git a/cpp/src/arrow/flight/arrow-flight.pc.in b/cpp/src/arrow/flight/arrow-flight.pc.in index 3d66f9937ee..955fc19b0df 100644 --- a/cpp/src/arrow/flight/arrow-flight.pc.in +++ b/cpp/src/arrow/flight/arrow-flight.pc.in @@ -15,8 +15,9 @@ # specific language governing permissions and limitations # under the License. -libdir=@CMAKE_INSTALL_FULL_LIBDIR@ -includedir=@CMAKE_INSTALL_FULL_INCLUDEDIR@ +prefix=@CMAKE_INSTALL_PREFIX@ +includedir=@ARROW_PKG_CONFIG_INCLUDEDIR@ +libdir=@ARROW_PKG_CONFIG_LIBDIR@ Name: Apache Arrow Flight Description: Apache Arrow's RPC system built on gRPC diff --git a/cpp/src/arrow/flight/sql/arrow-flight-sql.pc.in b/cpp/src/arrow/flight/sql/arrow-flight-sql.pc.in index 6d4eab0b4a0..4f8398bdd25 100644 --- a/cpp/src/arrow/flight/sql/arrow-flight-sql.pc.in +++ b/cpp/src/arrow/flight/sql/arrow-flight-sql.pc.in @@ -15,8 +15,9 @@ # specific language governing permissions and limitations # under the License. -libdir=@CMAKE_INSTALL_FULL_LIBDIR@ -includedir=@CMAKE_INSTALL_FULL_INCLUDEDIR@ +prefix=@CMAKE_INSTALL_PREFIX@ +includedir=@ARROW_PKG_CONFIG_INCLUDEDIR@ +libdir=@ARROW_PKG_CONFIG_LIBDIR@ Name: Apache Arrow Flight SQL Description: Apache Arrow Flight SQL extension diff --git a/cpp/src/arrow/gpu/arrow-cuda.pc.in b/cpp/src/arrow/gpu/arrow-cuda.pc.in index 858096f8922..84c8c588985 100644 --- a/cpp/src/arrow/gpu/arrow-cuda.pc.in +++ b/cpp/src/arrow/gpu/arrow-cuda.pc.in @@ -15,8 +15,9 @@ # specific language governing permissions and limitations # under the License. -libdir=@CMAKE_INSTALL_FULL_LIBDIR@ -includedir=@CMAKE_INSTALL_FULL_INCLUDEDIR@ +prefix=@CMAKE_INSTALL_PREFIX@ +includedir=@ARROW_PKG_CONFIG_INCLUDEDIR@ +libdir=@ARROW_PKG_CONFIG_LIBDIR@ Name: Apache Arrow CUDA Description: CUDA integration library for Apache Arrow diff --git a/cpp/src/arrow/json/arrow-json.pc.in b/cpp/src/arrow/json/arrow-json.pc.in index ace2a07a3af..55a7cdda2fe 100644 --- a/cpp/src/arrow/json/arrow-json.pc.in +++ b/cpp/src/arrow/json/arrow-json.pc.in @@ -15,8 +15,9 @@ # specific language governing permissions and limitations # under the License. -libdir=@CMAKE_INSTALL_FULL_LIBDIR@ -includedir=@CMAKE_INSTALL_FULL_INCLUDEDIR@ +prefix=@CMAKE_INSTALL_PREFIX@ +includedir=@ARROW_PKG_CONFIG_INCLUDEDIR@ +libdir=@ARROW_PKG_CONFIG_LIBDIR@ Name: Apache Arrow JSON Description: JSON reader module for Apache Arrow diff --git a/cpp/src/arrow/python/arrow-python-flight.pc.in b/cpp/src/arrow/python/arrow-python-flight.pc.in index fabed1b2d44..a98ad1fbf6c 100644 --- a/cpp/src/arrow/python/arrow-python-flight.pc.in +++ b/cpp/src/arrow/python/arrow-python-flight.pc.in @@ -15,8 +15,9 @@ # specific language governing permissions and limitations # under the License. -libdir=@CMAKE_INSTALL_FULL_LIBDIR@ -includedir=@CMAKE_INSTALL_FULL_INCLUDEDIR@ +prefix=@CMAKE_INSTALL_PREFIX@ +includedir=@ARROW_PKG_CONFIG_INCLUDEDIR@ +libdir=@ARROW_PKG_CONFIG_LIBDIR@ Name: Apache Arrow Python Flight Description: Python integration library for Apache Arrow Flight diff --git a/cpp/src/arrow/python/arrow-python.pc.in b/cpp/src/arrow/python/arrow-python.pc.in index 52939519874..c077c7dc84c 100644 --- a/cpp/src/arrow/python/arrow-python.pc.in +++ b/cpp/src/arrow/python/arrow-python.pc.in @@ -15,8 +15,9 @@ # specific language governing permissions and limitations # under the License. -libdir=@CMAKE_INSTALL_FULL_LIBDIR@ -includedir=@CMAKE_INSTALL_FULL_INCLUDEDIR@ +prefix=@CMAKE_INSTALL_PREFIX@ +includedir=@ARROW_PKG_CONFIG_INCLUDEDIR@ +libdir=@ARROW_PKG_CONFIG_LIBDIR@ Name: Apache Arrow Python Description: Python integration library for Apache Arrow diff --git a/cpp/src/gandiva/gandiva.pc.in b/cpp/src/gandiva/gandiva.pc.in index 22ff11a4ff5..60034c28579 100644 --- a/cpp/src/gandiva/gandiva.pc.in +++ b/cpp/src/gandiva/gandiva.pc.in @@ -16,8 +16,8 @@ # under the License. prefix=@CMAKE_INSTALL_PREFIX@ -libdir=${prefix}/@CMAKE_INSTALL_LIBDIR@ -includedir=${prefix}/@CMAKE_INSTALL_INCLUDEDIR@ +includedir=@ARROW_PKG_CONFIG_INCLUDEDIR@ +libdir=@ARROW_PKG_CONFIG_LIBDIR@ Name: Gandiva Description: Gandiva is a toolset for compiling and evaluating expressions on Arrow data. diff --git a/cpp/src/parquet/parquet.pc.in b/cpp/src/parquet/parquet.pc.in index 3b29263a9d6..e510bb1d6bf 100644 --- a/cpp/src/parquet/parquet.pc.in +++ b/cpp/src/parquet/parquet.pc.in @@ -16,8 +16,8 @@ # under the License. prefix=@CMAKE_INSTALL_PREFIX@ -libdir=${prefix}/@CMAKE_INSTALL_LIBDIR@ -includedir=${prefix}/@CMAKE_INSTALL_INCLUDEDIR@ +includedir=@ARROW_PKG_CONFIG_INCLUDEDIR@ +libdir=@ARROW_PKG_CONFIG_LIBDIR@ so_version=@ARROW_SO_VERSION@ abi_version=@ARROW_SO_VERSION@ diff --git a/cpp/src/plasma/PlasmaConfig.cmake.in b/cpp/src/plasma/PlasmaConfig.cmake.in index 928b508763f..b4b39afd0c9 100644 --- a/cpp/src/plasma/PlasmaConfig.cmake.in +++ b/cpp/src/plasma/PlasmaConfig.cmake.in @@ -30,7 +30,7 @@ include(CMakeFindDependencyMacro) find_dependency(Arrow) -set(PLASMA_STORE_SERVER "@CMAKE_INSTALL_PREFIX@/@CMAKE_INSTALL_BINDIR@/plasma-store-server@CMAKE_EXECUTABLE_SUFFIX@") +set(PLASMA_STORE_SERVER "@CMAKE_INSTALL_FULL_BINDIR@/plasma-store-server@CMAKE_EXECUTABLE_SUFFIX@") # Load targets only once. If we load targets multiple times, CMake reports # already existent target error. diff --git a/cpp/src/plasma/plasma.pc.in b/cpp/src/plasma/plasma.pc.in index 17af015900f..796321a0ada 100644 --- a/cpp/src/plasma/plasma.pc.in +++ b/cpp/src/plasma/plasma.pc.in @@ -16,13 +16,14 @@ # under the License. prefix=@CMAKE_INSTALL_PREFIX@ -libdir=${prefix}/@CMAKE_INSTALL_LIBDIR@ -includedir=${prefix}/include +bindir=@ARROW_PKG_CONFIG_BINDIR@ +includedir=@ARROW_PKG_CONFIG_INCLUDEDIR@ +libdir=@ARROW_PKG_CONFIG_LIBDIR@ so_version=@PLASMA_SO_VERSION@ abi_version=@PLASMA_SO_VERSION@ full_so_version=@PLASMA_FULL_SO_VERSION@ -plasma_store_server=${prefix}/@CMAKE_INSTALL_BINDIR@/plasma-store-server@CMAKE_EXECUTABLE_SUFFIX@ +plasma_store_server=${bindir}/plasma-store-server@CMAKE_EXECUTABLE_SUFFIX@ executable=${plasma_store_server} Name: Plasma diff --git a/cpp/src/skyhook/skyhook.pc.in b/cpp/src/skyhook/skyhook.pc.in index a3a4da5ee9c..8f7acfa9797 100644 --- a/cpp/src/skyhook/skyhook.pc.in +++ b/cpp/src/skyhook/skyhook.pc.in @@ -16,11 +16,11 @@ # under the License. prefix=@CMAKE_INSTALL_PREFIX@ -libdir=${prefix}/@CMAKE_INSTALL_LIBDIR@ -includedir=${prefix}/@CMAKE_INSTALL_INCLUDEDIR@ +includedir=@ARROW_PKG_CONFIG_INCLUDEDIR@ +libdir=@ARROW_PKG_CONFIG_LIBDIR@ Name: Skyhook Description: Skyhook is a plugin for offloading computations into Ceph. Version: @SKYHOOK_VERSION@ Requires: arrow_dataset -Libs: -L${libdir} -larrow_skyhook_client \ No newline at end of file +Libs: -L${libdir} -larrow_skyhook_client