ClickHouse/cmake/find/snappy.cmake

22 lines
683 B
CMake
Raw Normal View History

option(USE_SNAPPY "Enable support of snappy library" ${ENABLE_LIBRARIES})
2019-02-19 20:51:44 +00:00
if(NOT USE_SNAPPY)
if (USE_INTERNAL_SNAPPY_LIBRARY)
message (${RECONFIGURE_MESSAGE_LEVEL} "Can't use internal snappy library with USE_SNAPPY=OFF")
endif()
return()
endif()
option (USE_INTERNAL_SNAPPY_LIBRARY "Set to FALSE to use system snappy library instead of bundled" ${NOT_UNBUNDLED})
2019-02-19 20:51:44 +00:00
if(NOT USE_INTERNAL_SNAPPY_LIBRARY)
find_library(SNAPPY_LIBRARY snappy)
if (NOT SNAPPY_LIBRARY)
message (${RECONFIGURE_MESSAGE_LEVEL} "Can't find system snappy library")
2019-09-11 10:01:38 +00:00
endif()
else ()
set(SNAPPY_LIBRARY snappy)
endif()
2019-02-19 20:51:44 +00:00
message (STATUS "Using snappy: ${SNAPPY_LIBRARY}")