Repository: parquet-cpp Updated Branches: refs/heads/master 507f35373 -> 1580d56d4
PARQUET-928: Support pkg-config Author: Kouhei Sutou <[email protected]> Closes #278 from kou/support-pkg-config and squashes the following commits: e0a564e [Kouhei Sutou] Support pkg-config Project: http://git-wip-us.apache.org/repos/asf/parquet-cpp/repo Commit: http://git-wip-us.apache.org/repos/asf/parquet-cpp/commit/1580d56d Tree: http://git-wip-us.apache.org/repos/asf/parquet-cpp/tree/1580d56d Diff: http://git-wip-us.apache.org/repos/asf/parquet-cpp/diff/1580d56d Branch: refs/heads/master Commit: 1580d56d4cf24f483355fafc9820cc701acc0e71 Parents: 507f353 Author: Kouhei Sutou <[email protected]> Authored: Wed Mar 29 18:20:19 2017 -0400 Committer: Wes McKinney <[email protected]> Committed: Wed Mar 29 18:20:19 2017 -0400 ---------------------------------------------------------------------- .gitignore | 2 ++ CMakeLists.txt | 3 +++ src/parquet/CMakeLists.txt | 8 ++++++++ src/parquet/arrow/CMakeLists.txt | 8 ++++++++ src/parquet/arrow/parquet-arrow.pc.in | 27 +++++++++++++++++++++++++++ src/parquet/parquet.pc.in | 26 ++++++++++++++++++++++++++ 6 files changed, 74 insertions(+) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/parquet-cpp/blob/1580d56d/.gitignore ---------------------------------------------------------------------- diff --git a/.gitignore b/.gitignore index f90103a..aeb80e1 100644 --- a/.gitignore +++ b/.gitignore @@ -11,3 +11,5 @@ cmake_install.cmake Makefile thirdparty + +*.pc http://git-wip-us.apache.org/repos/asf/parquet-cpp/blob/1580d56d/CMakeLists.txt ---------------------------------------------------------------------- diff --git a/CMakeLists.txt b/CMakeLists.txt index 2b0d812..1fb1261 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -18,6 +18,9 @@ cmake_minimum_required(VERSION 2.6) project(parquet-cpp) +file(READ "${CMAKE_CURRENT_SOURCE_DIR}/.parquetcppversion" PARQUET_VERSION) +string(REPLACE "\n" "" PARQUET_VERSION "${PARQUET_VERSION}") + include(ExternalProject) include(FindPkgConfig) http://git-wip-us.apache.org/repos/asf/parquet-cpp/blob/1580d56d/src/parquet/CMakeLists.txt ---------------------------------------------------------------------- diff --git a/src/parquet/CMakeLists.txt b/src/parquet/CMakeLists.txt index 1022095..fab0ff1 100644 --- a/src/parquet/CMakeLists.txt +++ b/src/parquet/CMakeLists.txt @@ -24,6 +24,14 @@ install(FILES types.h DESTINATION include/parquet) +# pkg-config support +configure_file(parquet.pc.in + "${CMAKE_CURRENT_BINARY_DIR}/parquet.pc" + @ONLY) +install( + FILES "${CMAKE_CURRENT_BINARY_DIR}/parquet.pc" + DESTINATION "lib/pkgconfig/") + ADD_PARQUET_TEST(compression-test) ADD_PARQUET_TEST(encoding-test) ADD_PARQUET_TEST(public-api-test) http://git-wip-us.apache.org/repos/asf/parquet-cpp/blob/1580d56d/src/parquet/arrow/CMakeLists.txt ---------------------------------------------------------------------- diff --git a/src/parquet/arrow/CMakeLists.txt b/src/parquet/arrow/CMakeLists.txt index d1d1178..c6a23ec 100644 --- a/src/parquet/arrow/CMakeLists.txt +++ b/src/parquet/arrow/CMakeLists.txt @@ -108,3 +108,11 @@ install(FILES schema.h writer.h DESTINATION include/parquet/arrow) + +# pkg-config support +configure_file(parquet-arrow.pc.in + "${CMAKE_CURRENT_BINARY_DIR}/parquet-arrow.pc" + @ONLY) +install( + FILES "${CMAKE_CURRENT_BINARY_DIR}/parquet-arrow.pc" + DESTINATION "lib/pkgconfig/") http://git-wip-us.apache.org/repos/asf/parquet-cpp/blob/1580d56d/src/parquet/arrow/parquet-arrow.pc.in ---------------------------------------------------------------------- diff --git a/src/parquet/arrow/parquet-arrow.pc.in b/src/parquet/arrow/parquet-arrow.pc.in new file mode 100644 index 0000000..3578e40 --- /dev/null +++ b/src/parquet/arrow/parquet-arrow.pc.in @@ -0,0 +1,27 @@ +# 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. + +prefix=@CMAKE_INSTALL_PREFIX@ +libdir=${prefix}/lib +includedir=${prefix}/include + +Name: Apache Parquet Apache Arrow adapter +Description: Apache Parquet Apache arrow adapter provides Arrow IPC modules for reading and writing Parquet format. +Version: @PARQUET_VERSION@ +Libs: -L${libdir} -lparquet_arrow +Cflags: -I${includedir} +Requires: parquet arrow-io http://git-wip-us.apache.org/repos/asf/parquet-cpp/blob/1580d56d/src/parquet/parquet.pc.in ---------------------------------------------------------------------- diff --git a/src/parquet/parquet.pc.in b/src/parquet/parquet.pc.in new file mode 100644 index 0000000..401b6c9 --- /dev/null +++ b/src/parquet/parquet.pc.in @@ -0,0 +1,26 @@ +# 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. + +prefix=@CMAKE_INSTALL_PREFIX@ +libdir=${prefix}/lib +includedir=${prefix}/include + +Name: Apache Parquet +Description: Apache Parquet is a columnar storage format. +Version: @PARQUET_VERSION@ +Libs: -L${libdir} -lparquet +Cflags: -I${includedir}
