diff --git a/cpp/src/arrow/adapters/orc/CMakeLists.txt b/cpp/src/arrow/adapters/orc/CMakeLists.txt index 5baff9df7299f..b1d38cbe68ca1 100644 --- a/cpp/src/arrow/adapters/orc/CMakeLists.txt +++ b/cpp/src/arrow/adapters/orc/CMakeLists.txt @@ -23,9 +23,7 @@ install(FILES adapter.h DESTINATION "${CMAKE_INSTALL_INCLUDEDIR}/arrow/adapters/orc") # pkg-config support -configure_file(arrow-orc.pc.in "${CMAKE_CURRENT_BINARY_DIR}/arrow-orc.pc" @ONLY) -install(FILES "${CMAKE_CURRENT_BINARY_DIR}/arrow-orc.pc" - DESTINATION "${CMAKE_INSTALL_LIBDIR}/pkgconfig/") +arrow_add_pkg_config("arrow-orc") set(ORC_MIN_TEST_LIBS GTest::Main GTest::GTest) diff --git a/cpp/src/arrow/dataset/CMakeLists.txt b/cpp/src/arrow/dataset/CMakeLists.txt index d8b3ecc0eafa2..c6898ab8478ef 100644 --- a/cpp/src/arrow/dataset/CMakeLists.txt +++ b/cpp/src/arrow/dataset/CMakeLists.txt @@ -20,6 +20,9 @@ add_custom_target(arrow_dataset) # Headers: top level arrow_install_all_headers("arrow/dataset") +# pkg-config support +arrow_add_pkg_config("arrow-dataset") + set(ARROW_DATASET_SRCS scanner.cc) add_arrow_lib(arrow_dataset diff --git a/cpp/src/arrow/dataset/arrow-dataset.pc.in b/cpp/src/arrow/dataset/arrow-dataset.pc.in new file mode 100644 index 0000000000000..d40a8d958319c --- /dev/null +++ b/cpp/src/arrow/dataset/arrow-dataset.pc.in @@ -0,0 +1,24 @@ +# Licensed to the Apache Software Foundation (ASF) under one +# or more contributor license agreements. See the NOTICE file +# distributed with this work for additional information +# regarding copyright ownership. The ASF licenses this file +# to you under the Apache License, Version 2.0 (the +# "License"); you may not use this file except in compliance +# with the License. You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, +# software distributed under the License is distributed on an +# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY +# KIND, either express or implied. See the License for the +# specific language governing permissions and limitations +# under the License. + +libdir=@CMAKE_INSTALL_FULL_LIBDIR@ +includedir=@CMAKE_INSTALL_FULL_INCLUDEDIR@ + +Name: Apache Arrow Datasets +Description: Apache Arrow Datasets provides an API to read and write semantic datasets stored in different locations and formats. +Version: @ARROW_VERSION@ +Requires: arrow diff --git a/cpp/src/arrow/flight/CMakeLists.txt b/cpp/src/arrow/flight/CMakeLists.txt index f733b5458a0b9..bd07fcf46ea5d 100644 --- a/cpp/src/arrow/flight/CMakeLists.txt +++ b/cpp/src/arrow/flight/CMakeLists.txt @@ -21,9 +21,7 @@ add_custom_target(arrow_flight) arrow_install_all_headers("arrow/flight") # pkg-config support -configure_file(arrow-flight.pc.in "${CMAKE_CURRENT_BINARY_DIR}/arrow-flight.pc" @ONLY) -install(FILES "${CMAKE_CURRENT_BINARY_DIR}/arrow-flight.pc" - DESTINATION "${CMAKE_INSTALL_LIBDIR}/pkgconfig/") +arrow_add_pkg_config("arrow-flight") set(ARROW_FLIGHT_STATIC_LINK_LIBS protobuf::libprotobuf