TDengine/source/dnode/mnode/impl/CMakeLists.txt
WANG Xu c52c68aa4f
sync: apply remaining build system changes from monorepo (main)
The following commits could not be applied individually due to context
differences between the monorepo and the public repo's build files.
They have been applied as a cumulative diff to ensure the final state
matches the monorepo exactly:

- chore: sync CI files with 3.0 branch to eliminate merge conflicts (rd-public/tsdb!271)
- revert(refactor): dynamically link taosd taosudf taosmqtt against libtaosnative.so to reduce binary size (revert #183) (rd-public/tsdb!282)
- fix(docs): autofix formatting issues across all doc files (rd-public/tsdb!296)
- feat: support -DBUILD_SANITIZER=true on windows for debug build (rd-public/tsdb!291)
- feat(build): build cache, mirror, and sccache optimizations (rd-public/tsdb!326)
- docs: update image for three replica (rd-public/tsdb!324)
- enh: shared storage on windows (rd-public/tsdb!333)
- fix(cmake): convert ext_libs3 from git clone to URL tarball download (rd-public/tsdb!360)
- feat: dual-source deps and comprehensive docs/packaging (cherry-pick to main) (rd-public/tsdb!352)
- fix(cmake): guard DOWNLOAD_EXTRACT_TIMESTAMP for CMake < 3.24 and fix duplicate Cargo.lock entry (rd-public/tsdb!369)
- fix: test case execution failure in pytest.sh (rd-public/tsdb!338)
- enh: built-in compilation support for Python UDF plugins use abi3 (rd-public/tsdb!325)
2026-05-23 14:11:50 +08:00

62 lines
1.8 KiB
CMake
Executable file

aux_source_directory(src MNODE_SRC)
if(TD_PRIVILEGE)
ADD_DEFINITIONS(-D_PRIVILEGE)
endif()
if(TD_ENTERPRISE)
LIST(APPEND MNODE_SRC ${TD_ENTERPRISE_DIR}/source/plugins/privilege/src/privilege.c)
LIST(APPEND MNODE_SRC ${TD_ENTERPRISE_DIR}/source/plugins/mnode/src/mndDb.c)
LIST(APPEND MNODE_SRC ${TD_ENTERPRISE_DIR}/source/plugins/mnode/src/mndVgroup.c)
LIST(APPEND MNODE_SRC ${TD_ENTERPRISE_DIR}/source/plugins/mnode/src/mndDnode.c)
LIST(APPEND MNODE_SRC ${TD_ENTERPRISE_DIR}/source/plugins/view/src/mndView.c)
LIST(APPEND MNODE_SRC ${TD_ENTERPRISE_DIR}/source/plugins/mnode/src/mndMount.c)
LIST(APPEND MNODE_SRC ${TD_ENTERPRISE_DIR}/source/plugins/token/src/mndTokenImpl.c)
LIST(APPEND MNODE_SRC ${TD_ENTERPRISE_DIR}/source/plugins/xnode/src/mndXnodeImpl.c)
if(BUILD_WITH_S3)
add_definitions(-DUSE_S3)
ELSEIF(BUILD_WITH_COS)
add_definitions(-DUSE_COS)
endif()
endif()
if(BUILD_WITH_ANALYSIS)
add_definitions(-DUSE_ANALYTICS)
endif()
add_library(mnode STATIC ${MNODE_SRC})
target_include_directories(
mnode
PUBLIC
"${TD_SOURCE_DIR}/include/dnode/mnode"
"${TD_SOURCE_DIR}/include/dnode/mgmt"
"${TD_SOURCE_DIR}/include/dnode/xnode"
PRIVATE "${CMAKE_CURRENT_SOURCE_DIR}/inc"
PUBLIC "${TD_SOURCE_DIR}/source/libs/totp/inc"
"${TD_SOURCE_DIR}/include/libs/txnode/inc"
PRIVATE "${TD_ENTERPRISE_DIR}/source/plugins/privilege/inc"
)
if(TD_ENTERPRISE)
target_include_directories(
mnode
PRIVATE "${TD_ENTERPRISE_DIR}/source/plugins/taosk/inc"
)
endif()
target_link_libraries(
mnode scheduler sdb wal transport sync monitor executor qworker new-stream parser audit monitorfw totp xnode txnode mgmt_mnode
)
if(DEFINED GRANT_CFG_INCLUDE_DIR)
add_definitions(-DGRANTS_CFG)
endif()
if(TD_GRANT)
TARGET_LINK_LIBRARIES(mnode grant)
ADD_DEFINITIONS(-D_GRANT)
endif()
if(BUILD_TEST)
add_subdirectory(test)
endif()