CMakeLists.txt 868 字节
Newer Older
H
refact  
Hongze Cheng 已提交
1
aux_source_directory(src INDEX_SRC)
S
monitor  
Shengliang Guan 已提交
2
add_library(index STATIC ${INDEX_SRC})
H
refact  
Hongze Cheng 已提交
3 4
target_include_directories(
    index
wafwerar's avatar
wafwerar 已提交
5 6
    PUBLIC "${TD_SOURCE_DIR}/include/libs/index"
    PUBLIC "${TD_SOURCE_DIR}/include/os"
H
refact  
Hongze Cheng 已提交
7
    PRIVATE "${CMAKE_CURRENT_SOURCE_DIR}/inc"
dengyihao's avatar
dengyihao 已提交
8
    
dengyihao's avatar
dengyihao 已提交
9 10 11 12 13
)
target_link_libraries(
    index 
    PUBLIC os
    PUBLIC util
dengyihao's avatar
dengyihao 已提交
14
    PUBLIC common
15
#    PUBLIC vnode
dengyihao's avatar
dengyihao 已提交
16 17 18
    PUBLIC nodes
    PUBLIC scalar 
    PUBLIC function 
dengyihao's avatar
dengyihao 已提交
19 20 21 22 23
)

if (${BUILD_WITH_LUCENE})
  target_include_directories(
    index
wafwerar's avatar
wafwerar 已提交
24
    PUBLIC "${TD_SOURCE_DIR}/deps/lucene/include"
dengyihao's avatar
dengyihao 已提交
25
  )
wafwerar's avatar
wafwerar 已提交
26
  LINK_DIRECTORIES("${TD_SOURCE_DIR}/deps/lucene/debug/src/core")
dengyihao's avatar
dengyihao 已提交
27 28 29 30 31 32
  target_link_libraries(
    index
    PUBLIC lucene++
  )
endif(${BUILD_WITH_LUCENE})

dengyihao's avatar
dengyihao 已提交
33 34 35 36 37
if (${BUILD_WITH_INVERTEDINDEX})
  add_definitions(-DUSE_INVERTED_INDEX) 
endif(${BUILD_WITH_INVERTEDINDEX})


dengyihao's avatar
dengyihao 已提交
38 39 40
if (${BUILD_TEST})
   add_subdirectory(test)
endif(${BUILD_TEST})
dengyihao's avatar
dengyihao 已提交
41