Repository: parquet-cpp Updated Branches: refs/heads/master 936650b27 -> 879feb2e6
PARQUET-940: Fix a bug that Arrow libraries may not be found If we find Arrow by pkg-config and Arrow is installed into system directory such as /usr, Arrow libraries can't be found. Because pkg-config omits system directory from ARROW_LIBRARY_DIRS. In this case, ARROW_LIBS is empty then Arrow libraries aren't found. We should use ARROW_LIB_DIR (= $(pkg-config arrow --variable=libdir) instead of ARROW_LIBRARY_DIRS. It always returns directory that has Arrow libraries. Author: Kouhei Sutou <[email protected]> Closes #286 from kou/fix-arrow-lib-dir-detection and squashes the following commits: 2d54baf [Kouhei Sutou] Fix a bug that Arrow libraries may not be found Project: http://git-wip-us.apache.org/repos/asf/parquet-cpp/repo Commit: http://git-wip-us.apache.org/repos/asf/parquet-cpp/commit/879feb2e Tree: http://git-wip-us.apache.org/repos/asf/parquet-cpp/tree/879feb2e Diff: http://git-wip-us.apache.org/repos/asf/parquet-cpp/diff/879feb2e Branch: refs/heads/master Commit: 879feb2e6b51686c458883ef7b5769a832891d4e Parents: 936650b Author: Kouhei Sutou <[email protected]> Authored: Sun Apr 2 14:18:38 2017 +0200 Committer: Uwe L. Korn <[email protected]> Committed: Sun Apr 2 14:18:38 2017 +0200 ---------------------------------------------------------------------- cmake_modules/ThirdpartyToolchain.cmake | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/parquet-cpp/blob/879feb2e/cmake_modules/ThirdpartyToolchain.cmake ---------------------------------------------------------------------- diff --git a/cmake_modules/ThirdpartyToolchain.cmake b/cmake_modules/ThirdpartyToolchain.cmake index 09f2f2e..bf2bb36 100644 --- a/cmake_modules/ThirdpartyToolchain.cmake +++ b/cmake_modules/ThirdpartyToolchain.cmake @@ -357,7 +357,6 @@ 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}) if (COMMAND pkg_get_variable) pkg_get_variable(ARROW_ABI_VERSION arrow abi_version) @@ -380,11 +379,11 @@ if (ARROW_FOUND AND ARROW_IO_FOUND) 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}${ARROW_SHARED_LIB_SUFFIX}) - set(ARROW_STATIC_LIB ${ARROW_LIBS}/${ARROW_LIB_NAME}${CMAKE_STATIC_LIBRARY_SUFFIX}) + set(ARROW_SHARED_LIB ${ARROW_LIBDIR}/${ARROW_LIB_NAME}${CMAKE_SHARED_LIBRARY_SUFFIX}${ARROW_SHARED_LIB_SUFFIX}) + set(ARROW_STATIC_LIB ${ARROW_LIBDIR}/${ARROW_LIB_NAME}${CMAKE_STATIC_LIBRARY_SUFFIX}) - set(ARROW_IO_SHARED_LIB ${ARROW_LIBS}/${ARROW_IO_LIB_NAME}${CMAKE_SHARED_LIBRARY_SUFFIX}${ARROW_IO_SHARED_LIB_SUFFIX}) - set(ARROW_IO_STATIC_LIB ${ARROW_LIBS}/${ARROW_IO_LIB_NAME}${CMAKE_STATIC_LIBRARY_SUFFIX}) + set(ARROW_IO_SHARED_LIB ${ARROW_LIBDIR}/${ARROW_IO_LIB_NAME}${CMAKE_SHARED_LIBRARY_SUFFIX}${ARROW_IO_SHARED_LIB_SUFFIX}) + set(ARROW_IO_STATIC_LIB ${ARROW_LIBDIR}/${ARROW_IO_LIB_NAME}${CMAKE_STATIC_LIBRARY_SUFFIX}) else() find_package(Arrow) endif()
