CMakeLists.txt 748 字节
Newer Older
H
refact  
Hongze Cheng 已提交
1 2 3 4 5 6
aux_source_directory(src INDEX_SRC)
add_library(index ${INDEX_SRC})
target_include_directories(
    index
    PUBLIC "${CMAKE_SOURCE_DIR}/include/libs/index"
    PRIVATE "${CMAKE_CURRENT_SOURCE_DIR}/inc"
dengyihao's avatar
dengyihao 已提交
7 8 9 10 11
)
target_link_libraries(
    index 
    PUBLIC os
    PUBLIC util
dengyihao's avatar
dengyihao 已提交
12
    PUBLIC common
dengyihao's avatar
dengyihao 已提交
13 14 15 16 17 18 19 20 21 22 23 24 25 26
)

if (${BUILD_WITH_LUCENE})
  target_include_directories(
    index
    PUBLIC "${CMAKE_SOURCE_DIR}/deps/lucene/include"
  )
  LINK_DIRECTORIES("${CMAKE_SOURCE_DIR}/deps/lucene/debug/src/core")
  target_link_libraries(
    index
    PUBLIC lucene++
  )
endif(${BUILD_WITH_LUCENE})

dengyihao's avatar
dengyihao 已提交
27 28 29 30 31
if (${BUILD_WITH_INVERTEDINDEX})
  add_definitions(-DUSE_INVERTED_INDEX) 
endif(${BUILD_WITH_INVERTEDINDEX})


dengyihao's avatar
dengyihao 已提交
32 33 34 35
if (${BUILD_TEST})
  add_subdirectory(test)
endif(${BUILD_TEST})