CMakeLists.txt 1.3 KB
Newer Older
H
Hongze Cheng 已提交
1
set(META_DB_IMPL_LIST "BDB" "TDB")
H
Hongze Cheng 已提交
2
set(META_DB_IMPL "TDB" CACHE STRING "Use BDB as the default META implementation")
H
Hongze Cheng 已提交
3 4 5 6 7 8 9 10
set_property(CACHE META_DB_IMPL PROPERTY STRINGS ${META_DB_IMPL_LIST})

if(META_DB_IMPL IN_LIST META_DB_IMPL_LIST)
    message(STATUS "META DB Impl: ${META_DB_IMPL}==============")
else()
    message(FATAL_ERROR "Invalid META DB IMPL: ${META_DB_IMPL}==============")
endif()

H
Hongze Cheng 已提交
11
aux_source_directory(src/meta META_SRC)
H
Hongze Cheng 已提交
12 13 14 15 16 17
if(${META_DB_IMPL} STREQUAL "BDB")
    list(REMOVE_ITEM META_SRC "src/meta/metaTDBImpl.c")
elseif(${META_DB_IMPL} STREQUAL "TDB")
    list(REMOVE_ITEM META_SRC "src/meta/metaBDBImpl.c")
endif()

H
Hongze Cheng 已提交
18 19 20
aux_source_directory(src/tq TQ_SRC)
aux_source_directory(src/tsdb TSDB_SRC)
aux_source_directory(src/vnd VND_SRC)
H
Hongze Cheng 已提交
21

H
Hongze Cheng 已提交
22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43
list(APPEND
    VNODE_SRC
    ${META_SRC}
    ${TQ_SRC}
    ${TSDB_SRC}
    ${VND_SRC}
)

add_library(vnode STATIC ${VNODE_SRC})
target_include_directories(
    vnode
    PUBLIC inc
    PRIVATE src/inc
)
target_link_libraries(
    vnode
    PUBLIC os
    PUBLIC util
    PUBLIC common
    PUBLIC transport
    PUBLIC tfs
    PUBLIC wal
L
Liu Jicong 已提交
44
    PUBLIC scheduler
45
    PUBLIC executor
L
Liu Jicong 已提交
46
    PUBLIC stream
H
Hongze Cheng 已提交
47
    PUBLIC qworker
S
Shengliang Guan 已提交
48
    PUBLIC sync
H
Hongze Cheng 已提交
49 50 51
    # TODO: get rid of BDB
    PUBLIC bdb
    PUBLIC tdb
H
Hongze Cheng 已提交
52 53 54
)

if(${BUILD_TEST})
C
Cary Xu 已提交
55
    add_subdirectory(test)
H
Hongze Cheng 已提交
56
endif(${BUILD_TEST})