CMakeLists.txt 1.4 KB
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})
D
dapan1121 已提交
11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47
  if (${BUILD_CONTRIB})
    target_link_libraries(
      stream
      PUBLIC rocksdb tdb
      PRIVATE  os util transport qcom executor wal index
    )
    target_include_directories(
      stream
      PUBLIC "${TD_SOURCE_DIR}/contrib/rocksdb/include"
    )
  else()
    if (TD_LINUX)
      target_include_directories(
      stream
      PUBLIC "${TD_SOURCE_DIR}/deps/${TD_DEPS_DIR}/rocksdb_static"
    )
    target_link_directories(
      stream 
      PUBLIC "${TD_SOURCE_DIR}/deps/${TD_DEPS_DIR}/rocksdb_static"
    )
    target_link_libraries(
      stream
      PUBLIC rocksdb tdb
      PRIVATE  os util transport qcom executor wal index
    )
    else() 
      target_link_libraries(
        stream
        PUBLIC rocksdb tdb
        PRIVATE  os util transport qcom executor wal index
      )
      target_include_directories(
        stream
        PUBLIC "${TD_SOURCE_DIR}/contrib/rocksdb/include"
      )
    endif()
  endif() 
dengyihao's avatar
dengyihao 已提交
48
  add_definitions(-DUSE_ROCKSDB)
dengyihao's avatar
dengyihao 已提交
49 50 51 52 53 54 55 56
endif(${BUILD_WITH_ROCKSDB})


#target_link_libraries(
#    stream
#    PUBLIC tdb
#    PRIVATE os util transport qcom executor
#)
L
Liu Jicong 已提交
57 58 59 60

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