CMakeLists.txt 856 字节
Newer Older
L
Liu Jicong 已提交
1 2 3 4
aux_source_directory(src STREAM_SRC)
add_library(stream STATIC ${STREAM_SRC})
target_include_directories(
    stream
wafwerar's avatar
wafwerar 已提交
5
    PUBLIC "${TD_SOURCE_DIR}/include/libs/stream"
L
Liu Jicong 已提交
6 7 8
    PRIVATE "${CMAKE_CURRENT_SOURCE_DIR}/inc"
)

9

dengyihao's avatar
dengyihao 已提交
10
if(${BUILD_WITH_ROCKSDB})
11
  IF (TD_LINUX)
dengyihao's avatar
dengyihao 已提交
12
  target_link_libraries(
L
Liu Jicong 已提交
13
    stream
H
Hongze Cheng 已提交
14
    PUBLIC rocksdb-shared tdb
15
    PRIVATE  os util transport qcom executor wal index
dengyihao's avatar
dengyihao 已提交
16
  )
17 18 19 20 21 22 23 24
  ELSE() 
  target_link_libraries(
    stream
    PUBLIC rocksdb tdb
    PRIVATE  os util transport qcom executor wal index
  )

  ENDIF()
H
Haojun Liao 已提交
25

dengyihao's avatar
dengyihao 已提交
26 27 28 29
  target_include_directories(
    stream
    PUBLIC "${TD_SOURCE_DIR}/contrib/rocksdb/include"
  )
H
Haojun Liao 已提交
30

dengyihao's avatar
dengyihao 已提交
31
  add_definitions(-DUSE_ROCKSDB)
dengyihao's avatar
dengyihao 已提交
32 33 34 35 36 37 38 39
endif(${BUILD_WITH_ROCKSDB})


#target_link_libraries(
#    stream
#    PUBLIC tdb
#    PRIVATE os util transport qcom executor
#)
L
Liu Jicong 已提交
40 41 42 43

if(${BUILD_TEST})
    ADD_SUBDIRECTORY(test)
endif(${BUILD_TEST})
dengyihao's avatar
dengyihao 已提交
44