3 # SNAPPY_INCLUDE_DIR, where to find Snappy headers
4 # SNAPPY_LIBS, Snappy libraries
5 # SNAPPY_FOUND, If false, do not try to use Snappy
7 find_path(SNAPPY_INCLUDE_DIR snappy.h PATHS
12 #find_library can't seem to find a 64-bit binary if the 32-bit isn't there
13 set(SNAPPY_LIB_NAMES libsnappy snappy)
14 set(SNAPPY_LIB_PATHS /usr/local/lib /opt/local/lib /usr/lib64)
15 find_library(SNAPPY_LIB NAMES ${SNAPPY_LIB_NAMES} PATHS ${SNAPPY_LIB_PATHS})
17 if (SNAPPY_LIB AND SNAPPY_INCLUDE_DIR)
18 set(SNAPPY_FOUND TRUE)
19 set(SNAPPY_LIBS ${SNAPPY_LIB})
21 set(SNAPPY_FOUND FALSE)
25 if (NOT SNAPPY_FIND_QUIETLY)
26 message(STATUS "Found Snappy: ${SNAPPY_LIBS}")
29 if (SNAPPY_FIND_REQUIRED)
30 message(FATAL_ERROR "Could NOT find the Snappy library.")
32 message(STATUS "Snappy NOT found.")