CMakeLists.txt 914 字节
Newer Older
S
Shengliang Guan 已提交
1 2 3 4 5 6 7
aux_source_directory(dm DNODE_SRC)
aux_source_directory(qm DNODE_SRC)
aux_source_directory(bm DNODE_SRC)
aux_source_directory(sm DNODE_SRC)
aux_source_directory(vm DNODE_SRC)
aux_source_directory(mm DNODE_SRC)
aux_source_directory(main DNODE_SRC)
S
Shengliang Guan 已提交
8 9 10 11 12 13
add_library(dnode STATIC ${DNODE_SRC})
target_link_libraries(
    dnode cjson mnode vnode qnode snode bnode wal sync taos tfs monitor
)
target_include_directories(
    dnode
wafwerar's avatar
wafwerar 已提交
14
    PUBLIC "${TD_SOURCE_DIR}/include/dnode/mgmt"
S
Shengliang Guan 已提交
15
    PRIVATE "${CMAKE_CURRENT_SOURCE_DIR}/inc"
S
Shengliang Guan 已提交
16 17
)

S
Shengliang Guan 已提交
18
aux_source_directory(exe EXEC_SRC)
S
Shengliang Guan 已提交
19 20 21
add_executable(taosd ${EXEC_SRC})
target_include_directories(
    taosd
S
Shengliang Guan 已提交
22
    PRIVATE "${CMAKE_CURRENT_SOURCE_DIR}/inc"
S
Shengliang Guan 已提交
23 24
)
target_link_libraries(taosd dnode)
S
Shengliang Guan 已提交
25

wafwerar's avatar
wafwerar 已提交
26 27 28 29 30 31 32 33
IF (TD_GRANT)
  TARGET_LINK_LIBRARIES(taosd grant)
ENDIF ()
IF (TD_USB_DONGLE)
  TARGET_LINK_LIBRARIES(taosd usb_dongle)
else()
ENDIF ()

S
Shengliang Guan 已提交
34 35 36
if(${BUILD_TEST})
    add_subdirectory(test)
endif(${BUILD_TEST})