2016-09-28 20:53:15 +02:00
|
|
|
# - Find Snappy
|
|
|
|
# Find the snappy compression library and includes
|
|
|
|
#
|
2019-08-06 04:47:33 +02:00
|
|
|
# snappy_INCLUDE_DIRS - where to find snappy.h, etc.
|
|
|
|
# snappy_LIBRARIES - List of libraries when using snappy.
|
|
|
|
# snappy_FOUND - True if snappy found.
|
2016-09-28 20:53:15 +02:00
|
|
|
|
2019-08-06 04:47:33 +02:00
|
|
|
find_path(snappy_INCLUDE_DIRS
|
2016-09-28 20:53:15 +02:00
|
|
|
NAMES snappy.h
|
2019-08-06 04:47:33 +02:00
|
|
|
HINTS ${snappy_ROOT_DIR}/include)
|
2016-09-28 20:53:15 +02:00
|
|
|
|
2019-08-17 00:48:09 +02:00
|
|
|
find_library(snappy_LIBRARIES
|
2016-09-28 20:53:15 +02:00
|
|
|
NAMES snappy
|
2019-08-06 04:47:33 +02:00
|
|
|
HINTS ${snappy_ROOT_DIR}/lib)
|
2016-09-28 20:53:15 +02:00
|
|
|
|
|
|
|
include(FindPackageHandleStandardArgs)
|
2019-08-06 04:47:33 +02:00
|
|
|
find_package_handle_standard_args(snappy DEFAULT_MSG snappy_LIBRARIES snappy_INCLUDE_DIRS)
|
2016-09-28 20:53:15 +02:00
|
|
|
|
|
|
|
mark_as_advanced(
|
2019-08-06 04:47:33 +02:00
|
|
|
snappy_LIBRARIES
|
|
|
|
snappy_INCLUDE_DIRS)
|
|
|
|
|
|
|
|
if(snappy_FOUND AND NOT (TARGET snappy::snappy))
|
|
|
|
add_library (snappy::snappy UNKNOWN IMPORTED)
|
|
|
|
set_target_properties(snappy::snappy
|
|
|
|
PROPERTIES
|
|
|
|
IMPORTED_LOCATION ${snappy_LIBRARIES}
|
|
|
|
INTERFACE_INCLUDE_DIRECTORIES ${snappy_INCLUDE_DIRS})
|
|
|
|
endif()
|