ClickHouse/contrib/annoy-cmake/CMakeLists.txt

17 lines
549 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")
add_library(_annoy ${ANNOY_SOURCE_DIR}/annoylib.h)
target_include_directories(_annoy SYSTEM PUBLIC ${ANNOY_SOURCE_DIR})
set_target_properties(_annoy PROPERTIES LINKER_LANGUAGE CXX)
add_library(ch_contrib::annoy ALIAS _annoy)
2022-07-18 21:59:07 +00:00
target_compile_definitions(_annoy PUBLIC ENABLE_ANNOY)