ppsspp/ext/snappy/CMakeLists.txt
2017-03-19 18:44:12 +01:00

26 lines
558 B
CMake

find_package(Snappy)
if(SNAPPY_FOUND)
add_library(system_snappy INTERFACE)
add_library(Ext::Snappy ALIAS system_snappy)
target_link_libraries(system_snappy INTERFACE Snappy::Snappy)
else()
add_library(snappy STATIC
snappy-c.cpp
snappy-c.h
snappy-internal.h
snappy-sinksource.h
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()
add_library(Ext::Snappy ALIAS snappy)
endif()