2016-12-18 18:01:05 +00:00
|
|
|
find_package(Snappy)
|
2014-11-20 08:53:07 +00:00
|
|
|
|
2018-08-26 19:59:02 +00:00
|
|
|
if(SNAPPY_FOUND AND USE_SYSTEM_SNAPPY)
|
2017-03-19 17:38:04 +00:00
|
|
|
add_library(system_snappy INTERFACE)
|
|
|
|
add_library(Ext::Snappy ALIAS system_snappy)
|
|
|
|
target_link_libraries(system_snappy INTERFACE Snappy::Snappy)
|
|
|
|
else()
|
2016-12-18 18:01:05 +00:00
|
|
|
add_library(snappy STATIC
|
|
|
|
snappy-c.cpp
|
|
|
|
snappy-c.h
|
|
|
|
snappy-internal.h
|
2020-09-13 01:12:51 +00:00
|
|
|
snappy-sinksource.cpp
|
2016-12-18 18:01:05 +00:00
|
|
|
snappy-sinksource.h
|
2020-09-13 01:12:51 +00:00
|
|
|
snappy-stubs-internal.cpp
|
2016-12-18 18:01:05 +00:00
|
|
|
snappy-stubs-internal.h
|
|
|
|
snappy-stubs-public.h
|
|
|
|
snappy.cpp
|
|
|
|
snappy.h
|
|
|
|
)
|
|
|
|
target_include_directories(snappy PUBLIC .)
|
|
|
|
|
|
|
|
if(NOT MSVC)
|
|
|
|
target_compile_options(snappy PRIVATE "-O3")
|
|
|
|
endif()
|
|
|
|
|
2017-03-19 17:38:04 +00:00
|
|
|
add_library(Ext::Snappy ALIAS snappy)
|
2016-12-18 18:01:05 +00:00
|
|
|
endif()
|