cloudflare/ClickHouse
Publicmirrored fromhttps://github.com/cloudflare/ClickHouse
cmake/Modules/Findmetrohash.cmake
44lines · modecode
7 years ago
| 1 | # - Try to find metrohash headers and libraries. |
| 2 | # |
| 3 | # Usage of this module as follows: |
| 4 | # |
| 5 | # find_package(metrohash) |
| 6 | # |
| 7 | # Variables used by this module, they can change the default behaviour and need |
| 8 | # to be set before calling find_package: |
| 9 | # |
| 10 | # METROHASH_ROOT_DIR Set this variable to the root installation of |
| 11 | # metrohash if the module has problems finding |
| 12 | # the proper installation path. |
| 13 | # |
| 14 | # Variables defined by this module: |
| 15 | # |
| 16 | # METROHASH_FOUND System has metrohash libs/headers |
| 17 | # METROHASH_LIBRARIES The metrohash library/libraries |
| 18 | # METROHASH_INCLUDE_DIR The location of metrohash headers |
| 19 | |
| 20 | find_path(METROHASH_ROOT_DIR |
| 21 | NAMES include/metrohash.h |
| 22 | ) |
| 23 | |
| 24 | find_library(METROHASH_LIBRARIES |
| 25 | NAMES metrohash |
| 26 | PATHS ${METROHASH_ROOT_DIR}/lib ${METROHASH_LIBRARIES_PATHS} |
| 27 | ) |
| 28 | |
| 29 | find_path(METROHASH_INCLUDE_DIR |
| 30 | NAMES metrohash.h |
| 31 | PATHS ${METROHASH_ROOT_DIR}/include PATH_SUFFIXES metrohash ${METROHASH_INCLUDE_PATHS} |
| 32 | ) |
| 33 | |
| 34 | include(FindPackageHandleStandardArgs) |
| 35 | find_package_handle_standard_args(metrohash DEFAULT_MSG |
| 36 | METROHASH_LIBRARIES |
| 37 | METROHASH_INCLUDE_DIR |
| 38 | ) |
| 39 | |
| 40 | mark_as_advanced( |
| 41 | METROHASH_ROOT_DIR |
| 42 | METROHASH_LIBRARIES |
| 43 | METROHASH_INCLUDE_DIR |
| 44 | ) |