This is an automated email from the ASF dual-hosted git repository. wesm pushed a commit to branch master in repository https://gitbox.apache.org/repos/asf/arrow.git
The following commit(s) were added to refs/heads/master by this push: new 9effbed ARROW-2283: [C++] Support Arrow C++ installed in /usr detection by pkg-config 9effbed is described below commit 9effbedfa6949b91633197716fd44424903179b9 Author: Kouhei Sutou <k...@clear-code.com> AuthorDate: Wed Mar 7 10:42:03 2018 -0500 ARROW-2283: [C++] Support Arrow C++ installed in /usr detection by pkg-config pkg-config doesn't show -I... and -L... flags when ... is the system default path (i.e. /usr). If Arrow C++ is installed in /usr, we couldn't detect include path and library path for Arrow C++. It's caused when we install Arrow C++ with .rpm and .deb packages. Author: Kouhei Sutou <k...@clear-code.com> Closes #1721 from kou/cpp-find-arrow and squashes the following commits: 4911c8fc <Kouhei Sutou> Add Debian based system support 0a2d9c99 <Kouhei Sutou> Support Arrow C++ installed in /usr detection by pkg-config --- cpp/cmake_modules/FindArrow.cmake | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/cpp/cmake_modules/FindArrow.cmake b/cpp/cmake_modules/FindArrow.cmake index 70defd6..0a1789a 100644 --- a/cpp/cmake_modules/FindArrow.cmake +++ b/cpp/cmake_modules/FindArrow.cmake @@ -25,6 +25,7 @@ # ARROW_FOUND, whether arrow has been found include(FindPkgConfig) +include(GNUInstallDirs) if ("$ENV{ARROW_HOME}" STREQUAL "") pkg_check_modules(ARROW arrow) @@ -33,6 +34,16 @@ if ("$ENV{ARROW_HOME}" STREQUAL "") message(STATUS "Arrow ABI version: ${ARROW_ABI_VERSION}") pkg_get_variable(ARROW_SO_VERSION arrow so_version) message(STATUS "Arrow SO version: ${ARROW_SO_VERSION}") + if ("${ARROW_INCLUDE_DIRS}" STREQUAL "") + set(ARROW_INCLUDE_DIRS "/usr/${CMAKE_INSTALL_INCLUDEDIR}") + endif() + if ("${ARROW_LIBRARY_DIRS}" STREQUAL "") + set(ARROW_LIBRARY_DIRS "/usr/${CMAKE_INSTALL_LIBDIR}") + if (EXISTS "/etc/debian_version" AND CMAKE_LIBRARY_ARCHITECTURE) + set(ARROW_LIBRARY_DIRS + "${ARROW_LIBRARY_DIRS}/${CMAKE_LIBRARY_ARCHITECTURE}") + endif() + endif() set(ARROW_INCLUDE_DIR ${ARROW_INCLUDE_DIRS}) set(ARROW_LIBS ${ARROW_LIBRARY_DIRS}) set(ARROW_SEARCH_LIB_PATH ${ARROW_LIBRARY_DIRS}) -- To stop receiving notification emails like this one, please contact w...@apache.org.