aux_source_directory(src DNODE_SRC)
add_library(dnode STATIC ${DNODE_SRC})
target_link_libraries(
    dnode
    PUBLIC cjson
    PUBLIC mnode
    PUBLIC vnode
    PUBLIC qnode
    PUBLIC snode
    PUBLIC bnode
    PUBLIC wal
    PUBLIC sync
    PUBLIC taos
    PUBLIC tfs
)
target_include_directories(
    dnode
    PUBLIC "${CMAKE_SOURCE_DIR}/include/dnode/mgmt"
    PRIVATE "${CMAKE_CURRENT_SOURCE_DIR}/inc"
)

if(${BUILD_TEST})
    add_subdirectory(test)
endif(${BUILD_TEST})