Repository: arrow
Updated Branches:
  refs/heads/master 268ffbeff -> fd4eb98af


ARROW-440: [C++] Support pkg-config

pkg-config is a tool to get build flags.

If Arrow supports pkg-config, users can set build flags easily.

For example, CMake supports pkg-config.

To support pkg-config, we just install .pc file that includes build
flags information.

Author: Kouhei Sutou <k...@clear-code.com>

Closes #250 from kou/ARROW-440-support-pkg-config and squashes the following 
commits:

f35fc44 [Kouhei Sutou] ARROW-440: [C++] Support pkg-config


Project: http://git-wip-us.apache.org/repos/asf/arrow/repo
Commit: http://git-wip-us.apache.org/repos/asf/arrow/commit/fd4eb98a
Tree: http://git-wip-us.apache.org/repos/asf/arrow/tree/fd4eb98a
Diff: http://git-wip-us.apache.org/repos/asf/arrow/diff/fd4eb98a

Branch: refs/heads/master
Commit: fd4eb98af9bbf19b7a640b55e2d8ed5ad87b6af1
Parents: 268ffbe
Author: Kouhei Sutou <k...@clear-code.com>
Authored: Wed Dec 21 16:50:55 2016 +0100
Committer: Uwe L. Korn <uw...@xhochy.com>
Committed: Wed Dec 21 16:50:55 2016 +0100

----------------------------------------------------------------------
 cpp/src/arrow/CMakeLists.txt      |  8 ++++++++
 cpp/src/arrow/arrow.pc.in         | 26 ++++++++++++++++++++++++++
 cpp/src/arrow/io/CMakeLists.txt   |  8 ++++++++
 cpp/src/arrow/io/arrow-io.pc.in   | 27 +++++++++++++++++++++++++++
 cpp/src/arrow/ipc/CMakeLists.txt  |  8 ++++++++
 cpp/src/arrow/ipc/arrow-ipc.pc.in | 27 +++++++++++++++++++++++++++
 6 files changed, 104 insertions(+)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/arrow/blob/fd4eb98a/cpp/src/arrow/CMakeLists.txt
----------------------------------------------------------------------
diff --git a/cpp/src/arrow/CMakeLists.txt b/cpp/src/arrow/CMakeLists.txt
index b8500ab..f8c5051 100644
--- a/cpp/src/arrow/CMakeLists.txt
+++ b/cpp/src/arrow/CMakeLists.txt
@@ -33,6 +33,14 @@ install(FILES
   test-util.h
   DESTINATION include/arrow)
 
+# pkg-config support
+configure_file(arrow.pc.in
+  "${CMAKE_CURRENT_BINARY_DIR}/arrow.pc"
+  @ONLY)
+install(
+  FILES "${CMAKE_CURRENT_BINARY_DIR}/arrow.pc"
+  DESTINATION "lib/pkgconfig/")
+
 #######################################
 # Unit tests
 #######################################

http://git-wip-us.apache.org/repos/asf/arrow/blob/fd4eb98a/cpp/src/arrow/arrow.pc.in
----------------------------------------------------------------------
diff --git a/cpp/src/arrow/arrow.pc.in b/cpp/src/arrow/arrow.pc.in
new file mode 100644
index 0000000..5ad429b
--- /dev/null
+++ b/cpp/src/arrow/arrow.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 Arrow
+Description: Arrow is a set of technologies that enable big-data systems to 
process and move data fast.
+Version: @ARROW_VERSION@
+Libs: -L${libdir} -larrow
+Cflags: -I${includedir}

http://git-wip-us.apache.org/repos/asf/arrow/blob/fd4eb98a/cpp/src/arrow/io/CMakeLists.txt
----------------------------------------------------------------------
diff --git a/cpp/src/arrow/io/CMakeLists.txt b/cpp/src/arrow/io/CMakeLists.txt
index e2b6496..2062cd4 100644
--- a/cpp/src/arrow/io/CMakeLists.txt
+++ b/cpp/src/arrow/io/CMakeLists.txt
@@ -134,3 +134,11 @@ install(FILES
 install(TARGETS arrow_io
   LIBRARY DESTINATION lib
   ARCHIVE DESTINATION lib)
+
+# pkg-config support
+configure_file(arrow-io.pc.in
+  "${CMAKE_CURRENT_BINARY_DIR}/arrow-io.pc"
+  @ONLY)
+install(
+  FILES "${CMAKE_CURRENT_BINARY_DIR}/arrow-io.pc"
+  DESTINATION "lib/pkgconfig/")

http://git-wip-us.apache.org/repos/asf/arrow/blob/fd4eb98a/cpp/src/arrow/io/arrow-io.pc.in
----------------------------------------------------------------------
diff --git a/cpp/src/arrow/io/arrow-io.pc.in b/cpp/src/arrow/io/arrow-io.pc.in
new file mode 100644
index 0000000..4b4abdd
--- /dev/null
+++ b/cpp/src/arrow/io/arrow-io.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 Arrow I/O
+Description: I/O interface for Arrow.
+Version: @ARROW_VERSION@
+Libs: -L${libdir} -larrow_io
+Cflags: -I${includedir}
+Requires: arrow

http://git-wip-us.apache.org/repos/asf/arrow/blob/fd4eb98a/cpp/src/arrow/ipc/CMakeLists.txt
----------------------------------------------------------------------
diff --git a/cpp/src/arrow/ipc/CMakeLists.txt b/cpp/src/arrow/ipc/CMakeLists.txt
index 619ca7c..d3e625a 100644
--- a/cpp/src/arrow/ipc/CMakeLists.txt
+++ b/cpp/src/arrow/ipc/CMakeLists.txt
@@ -159,3 +159,11 @@ install(FILES
 install(TARGETS arrow_ipc
   LIBRARY DESTINATION lib
   ARCHIVE DESTINATION lib)
+
+# pkg-config support
+configure_file(arrow-ipc.pc.in
+  "${CMAKE_CURRENT_BINARY_DIR}/arrow-ipc.pc"
+  @ONLY)
+install(
+  FILES "${CMAKE_CURRENT_BINARY_DIR}/arrow-ipc.pc"
+  DESTINATION "lib/pkgconfig/")

http://git-wip-us.apache.org/repos/asf/arrow/blob/fd4eb98a/cpp/src/arrow/ipc/arrow-ipc.pc.in
----------------------------------------------------------------------
diff --git a/cpp/src/arrow/ipc/arrow-ipc.pc.in 
b/cpp/src/arrow/ipc/arrow-ipc.pc.in
new file mode 100644
index 0000000..73b44c9
--- /dev/null
+++ b/cpp/src/arrow/ipc/arrow-ipc.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 Arrow IPC
+Description: IPC extension for Arrow.
+Version: @ARROW_VERSION@
+Libs: -L${libdir} -larrow_ipc
+Cflags: -I${includedir}
+Requires: arrow-io

Reply via email to