ClickHouse/contrib/annoy-cmake/CMakeLists.txt

16 lines
473 B
CMake
Raw Normal View History

2022-07-18 21:59:07 +00:00
option(ENABLE_ANNOY "Enable Annoy index support" ${ENABLE_LIBRARIES})
if (NOT ENABLE_ANNOY)
message (STATUS "Not using annoy")
return()
endif()
2022-07-10 15:10:47 +00:00
set(ANNOY_PROJECT_DIR "${ClickHouse_SOURCE_DIR}/contrib/annoy")
set(ANNOY_SOURCE_DIR "${ANNOY_PROJECT_DIR}/src")
2022-07-20 09:38:56 +00:00
add_library(_annoy INTERFACE)
target_include_directories(_annoy SYSTEM INTERFACE ${ANNOY_SOURCE_DIR})
2022-07-10 15:10:47 +00:00
add_library(ch_contrib::annoy ALIAS _annoy)
2022-07-20 09:38:56 +00:00
target_compile_definitions(_annoy INTERFACE ENABLE_ANNOY)