2016-09-28 18:53:15 +00:00
|
|
|
# - Find Snappy
|
|
|
|
# Find the snappy compression library and includes
|
|
|
|
#
|
2019-08-06 02:47:33 +00: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 18:53:15 +00:00
|
|
|
|
2019-08-06 02:47:33 +00:00
|
|
|
find_path(snappy_INCLUDE_DIRS
|
2016-09-28 18:53:15 +00:00
|
|
|
NAMES snappy.h
|
2019-08-06 02:47:33 +00:00
|
|
|
HINTS ${snappy_ROOT_DIR}/include)
|
2016-09-28 18:53:15 +00:00
|
|
|
|
2019-08-16 22:48:09 +00:00
|
|
|
find_library(snappy_LIBRARIES
|
2016-09-28 18:53:15 +00:00
|
|
|
NAMES snappy
|
2019-08-06 02:47:33 +00:00
|
|
|
HINTS ${snappy_ROOT_DIR}/lib)
|
2016-09-28 18:53:15 +00:00
|
|
|
|
|
|
|
include(FindPackageHandleStandardArgs)
|
2019-08-06 02:47:33 +00:00
|
|
|
find_package_handle_standard_args(snappy DEFAULT_MSG snappy_LIBRARIES snappy_INCLUDE_DIRS)
|
2016-09-28 18:53:15 +00:00
|
|
|
|
|
|
|
mark_as_advanced(
|
2019-08-06 02:47:33 +00: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()
|