ARROW-4930: [C++] Improve find_package() support

Backward incompatibilities:

  * find_package(Arrow) doesn't find Arrow Python.
    Users need to use find_package(ArrowPython).

  * find_package(ArrowCuda) doesn't work on not Windows (case
    sensitive environments). Use find_package(ArrowCUDA) instead.

Summary:

  * Create arrow_find_package() in FindArrow.cmake and use it in
    Find*.cmake.

  * arrow_find_package() is a function that finds an Arrow related
    package. It supports ARROW_HOME/PARQUET_HOME environment variable,
    CMake package configuration and pkg-config.

  * arrow_find_package() can find libraries installed under
    lib/x86_64-linux-gnu/ (on Debian), lib64/ (on CentOS), lib/,
    bin/ (on Windows).

    * We can remove workaround for ARROW-1090 in python/setup.py:
      https://issues.apache.org/jira/projects/ARROW/issues/ARROW-1090

  * Create Find*.cmake per component. It means that FindArrow.cmake
    doesn't find Arrow Python. Use find_package(ArrowPython) instead
    of find_package(Arrow).

    * Install Find*.cmake to be reusable.

    * Changes for Linux packages are for this.

  * Rename arrowConfig.cmake, arrowTarget.cmake and so on to
    ArrowConfig.cmake, ArrowTarget.cmake and so on to use the same
    package for FindArrow.cmake. arrow-config.cmake is added for
    backward compatibility. So users can use find_package(arrow)
    instead of find_package(Arrow).

  * ArrowConfig.cmake provides more useful variables such as
    ARROW_SO_VERSION and ARROW_FULL_SO_VERSION.

  * Rename FindArrowCuda.cmake to FindArrowCUDA.cmake because "CUDA"
    is the official name.

  * Use find_package_handle_standard_args() in Find*.cmake. It means
    that we can check required version by find_package(Arrow 0.15.0).

    * Changes for Parquet are for detecting Parquet version.

  * Use consistent variable names in Find*.cmake with keeping backward
    compatibility:

    * ${PACKAGE}_LIBS -> ${PACKAGE}_LIB_DIR: Because we use
      ${ARROW_INCLUDE_DIR} and CMake uses _DIR, _DIRECTORY, _PATH and
      so on.

    * ${PACKAGE}_SHARED_IMP_LIB -> ${PACKAGE}_IMPORT_LIB: Because
      CMake doesn't use SHARED for import library such as CMAKE_IMPORT_LIBRARY_SUFFIX.

  * Find*.cmake provides CMake targets such as arrow_shared and
    arrow_static even if it uses ARROW_HOME or pkg-config. Users can
    use them to link to Arrow.

  * Remove needless ABI_VERSION handling in python/CMakeLists.txt
    because ABI_VERSION just exists just for backward compatibility.
    We should use only SO_VERSION.

  * Rename "executable" to "plasma_store_server" in
    plasma.pc. "executable" is deprecated.

  * Add arrow-python-flight.pc.

Resolved issues:

  * ARROW-5021 [C++] Review hardcoded "lib" paths in
    Find$PACKAGE.cmake related to endogenous libraries
    https://issues.apache.org/jira/browse/ARROW-5021

Removed workarounds:

  * ARROW-1090 [Python] build_ext usability
    https://issues.apache.org/jira/projects/ARROW/issues/ARROW-1090

  * ARROW-5025 [Python][Packaging] wheel for Windows are broken
    https://issues.apache.org/jira/browse/ARROW-5025

  * ARROW-5026 [Python][Packaging] conda package on non Windows is broken
    https://issues.apache.org/jira/browse/ARROW-5026

Closes #5767 from kou/cpp-fix-discovery and squashes the following commits:

175fa0fcb <Sutou Kouhei> Add comments for shared library paths manipulation in pkg-config mode
62fef66a8 <Sutou Kouhei> Add comments to internal functions and macros
81b9daa8a <Sutou Kouhei> SHARED_IMPLIB -> IMPORT_LIB
00fe010f7 <Sutou Kouhei> Don't reset defined ARROW_MSVC_STATIC_LIB_SUFFIX
a2adff046 <Sutou Kouhei> Fix a typo
67665ebb2 <Sutou Kouhei> Add a comment why we can't load targets multiple times
070c5d5b8 <Sutou Kouhei> Always load options
aea7801ae <Sutou Kouhei> Update variable name
5c4634ffb <Sutou Kouhei> Use absolute path instead of library name
d7a94dd33 <Sutou Kouhei> Add missing _path
4da45f796 <Sutou Kouhei> Format
0f352f190 <Sutou Kouhei> Fix a typo
ef152c4a5 <Sutou Kouhei> Add missing libarrow-python-flight
20b98d991 <Sutou Kouhei> Add missing arrow-python-flight.pc
53d15080f <Sutou Kouhei> Install Find*.cmake only for enabled modules
1b41a1f92 <Sutou Kouhei> ARROW-4930:  Improve find_package() support

Authored-by: Sutou Kouhei <kou@clear-code.com>
Signed-off-by: Antoine Pitrou <antoine@python.org>
53 files changed
tree: 4fc8a8b9a2f579ff45ad046b2b0c7f15d362e667
  1. .github/
  2. c_glib/
  3. ci/
  4. cpp/
  5. csharp/
  6. dev/
  7. docs/
  8. format/
  9. go/
  10. integration/
  11. java/
  12. js/
  13. matlab/
  14. python/
  15. r/
  16. ruby/
  17. rust/
  18. .clang-format
  19. .clang-tidy
  20. .clang-tidy-ignore
  21. .dir-locals.el
  22. .dockerignore
  23. .gitattributes
  24. .gitignore
  25. .gitmodules
  26. .hadolint.yaml
  27. .pre-commit-config.yaml
  28. .readthedocs.yml
  29. .travis.yml
  30. appveyor.yml
  31. CHANGELOG.md
  32. cmake-format.py
  33. CODE_OF_CONDUCT.md
  34. CONTRIBUTING.md
  35. docker-compose.yml
  36. header
  37. LICENSE.txt
  38. Makefile.docker
  39. NOTICE.txt
  40. README.md
  41. run-cmake-format.py
README.md

Apache Arrow

Build Status Build Status Coverage Status Fuzzit Status License Twitter Follow

Powering In-Memory Analytics

Apache Arrow is a development platform for in-memory analytics. It contains a set of technologies that enable big data systems to process and move data fast.

Major components of the project include:

Arrow is an Apache Software Foundation project. Learn more at arrow.apache.org.

What's in the Arrow libraries?

The reference Arrow libraries contain a number of distinct software components:

  • Columnar vector and table-like containers (similar to data frames) supporting flat or nested types
  • Fast, language agnostic metadata messaging layer (using Google's Flatbuffers library)
  • Reference-counted off-heap buffer memory management, for zero-copy memory sharing and handling memory-mapped files
  • IO interfaces to local and remote filesystems
  • Self-describing binary wire formats (streaming and batch/file-like) for remote procedure calls (RPC) and interprocess communication (IPC)
  • Integration tests for verifying binary compatibility between the implementations (e.g. sending data from Java to C++)
  • Conversions to and from other in-memory data structures

How to Contribute

Please read our latest project contribution guide.

Getting involved

Even if you do not plan to contribute to Apache Arrow itself or Arrow integrations in other projects, we'd be happy to have you involved: