CMakeLists.txt 808 字节
Newer Older
S
Shengliang Guan 已提交
1
aux_source_directory(src MNODE_SRC)
S
Shengliang Guan 已提交
2 3 4
IF (TD_PRIVILEGE)
  ADD_DEFINITIONS(-D_PRIVILEGE)
ENDIF ()
X
Xiaoyu Wang 已提交
5
IF (TD_ENTERPRISE)
S
Shengliang Guan 已提交
6
  LIST(APPEND MNODE_SRC ${TD_ENTERPRISE_DIR}/src/plugins/privilege/src/privilege.c)
X
Xiaoyu Wang 已提交
7
  LIST(APPEND MNODE_SRC ${TD_ENTERPRISE_DIR}/src/plugins/mnode/src/mndDb.c)
C
cadem 已提交
8
  LIST(APPEND MNODE_SRC ${TD_ENTERPRISE_DIR}/src/plugins/mnode/src/mndVgroup.c)
S
Shengliang Guan 已提交
9 10
ENDIF ()

S
monitor  
Shengliang Guan 已提交
11
add_library(mnode STATIC ${MNODE_SRC})
S
Shengliang Guan 已提交
12 13
target_include_directories(
    mnode
wafwerar's avatar
wafwerar 已提交
14
    PUBLIC "${TD_SOURCE_DIR}/include/dnode/mnode"
S
Shengliang Guan 已提交
15
    PRIVATE "${CMAKE_CURRENT_SOURCE_DIR}/inc"
S
Shengliang Guan 已提交
16 17
)
target_link_libraries(
18
    mnode scheduler sdb wal transport cjson sync monitor executor qworker stream parser
19
)
M
Minglei Jin 已提交
20

wafwerar's avatar
wafwerar 已提交
21 22
IF (TD_GRANT)
  TARGET_LINK_LIBRARIES(mnode grant)
wafwerar's avatar
wafwerar 已提交
23
  ADD_DEFINITIONS(-D_GRANT)
wafwerar's avatar
wafwerar 已提交
24 25
ENDIF ()

26 27
if(${BUILD_TEST})
    add_subdirectory(test)
L
Liu Jicong 已提交
28
endif(${BUILD_TEST})