parquet-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From u..@apache.org
Subject parquet-cpp git commit: PARQUET-926: Use pkg-config to find Apache Arrow
Date Wed, 29 Mar 2017 06:13:54 GMT
Repository: parquet-cpp
Updated Branches:
  refs/heads/master d54e31327 -> 768b36cfd


PARQUET-926: Use pkg-config to find Apache Arrow

pkg-config is a tool to detect package. It's suitable for this propose.

If we can't find Apache Arrow by pkg-config, we use the current Apache
Arrow detect system as fallback.

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

Closes #276 from kou/use-pkg-config-to-find-arrow and squashes the following commits:

1494dba [Kouhei Sutou] Use CMAKE_SHARED_LIBRARY_PREFIX instead of raw "lib"
828d7ff [Kouhei Sutou] Use pkg-config to find Apache Arrow


Project: http://git-wip-us.apache.org/repos/asf/parquet-cpp/repo
Commit: http://git-wip-us.apache.org/repos/asf/parquet-cpp/commit/768b36cf
Tree: http://git-wip-us.apache.org/repos/asf/parquet-cpp/tree/768b36cf
Diff: http://git-wip-us.apache.org/repos/asf/parquet-cpp/diff/768b36cf

Branch: refs/heads/master
Commit: 768b36cfd744973ccb04dcb924760fb915775cde
Parents: d54e313
Author: Kouhei Sutou <kou@clear-code.com>
Authored: Wed Mar 29 08:13:27 2017 +0200
Committer: Uwe L. Korn <uwe@apache.org>
Committed: Wed Mar 29 08:13:27 2017 +0200

----------------------------------------------------------------------
 CMakeLists.txt                          |  1 +
 cmake_modules/ThirdpartyToolchain.cmake | 18 +++++++++++++++++-
 2 files changed, 18 insertions(+), 1 deletion(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/parquet-cpp/blob/768b36cf/CMakeLists.txt
----------------------------------------------------------------------
diff --git a/CMakeLists.txt b/CMakeLists.txt
index 75f855b..2b0d812 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -19,6 +19,7 @@ cmake_minimum_required(VERSION 2.6)
 project(parquet-cpp)
 
 include(ExternalProject)
+include(FindPkgConfig)
 
 if (NOT "$ENV{PARQUET_GCC_ROOT}" STREQUAL "")
   set(GCC_ROOT $ENV{PARQUET_GCC_ROOT})

http://git-wip-us.apache.org/repos/asf/parquet-cpp/blob/768b36cf/cmake_modules/ThirdpartyToolchain.cmake
----------------------------------------------------------------------
diff --git a/cmake_modules/ThirdpartyToolchain.cmake b/cmake_modules/ThirdpartyToolchain.cmake
index 6871174..330a3af 100644
--- a/cmake_modules/ThirdpartyToolchain.cmake
+++ b/cmake_modules/ThirdpartyToolchain.cmake
@@ -348,7 +348,23 @@ if(PARQUET_BUILD_BENCHMARKS)
 endif()
 
 ## Apache Arrow
-find_package(Arrow)
+pkg_check_modules(ARROW arrow)
+pkg_check_modules(ARROW_IO arrow-io)
+if (ARROW_FOUND AND ARROW_IO_FOUND)
+  set(ARROW_INCLUDE_DIR ${ARROW_INCLUDE_DIRS})
+  set(ARROW_LIBS ${ARROW_LIBRARY_DIRS})
+
+  set(ARROW_LIB_NAME ${CMAKE_SHARED_LIBRARY_PREFIX}arrow)
+  set(ARROW_IO_LIB_NAME ${CMAKE_SHARED_LIBRARY_PREFIX}arrow_io)
+
+  set(ARROW_SHARED_LIB ${ARROW_LIBS}/${ARROW_LIB_NAME}${CMAKE_SHARED_LIBRARY_SUFFIX})
+  set(ARROW_STATIC_LIB ${ARROW_LIBS}/${ARROW_LIB_NAME}${CMAKE_STATIC_LIBRARY_SUFFIX})
+
+  set(ARROW_IO_SHARED_LIB ${ARROW_LIBS}/${ARROW_IO_LIB_NAME}${CMAKE_SHARED_LIBRARY_SUFFIX})
+  set(ARROW_IO_STATIC_LIB ${ARROW_LIBS}/${ARROW_IO_LIB_NAME}${CMAKE_STATIC_LIBRARY_SUFFIX})
+else()
+  find_package(Arrow)
+endif()
 if (NOT ARROW_FOUND)
   set(ARROW_PREFIX "${CMAKE_CURRENT_BINARY_DIR}/arrow_ep/src/arrow_ep-install")
   set(ARROW_HOME "${ARROW_PREFIX}")


Mime
View raw message