feat: 新增路由功能

This commit is contained in:
2026-07-26 01:40:05 +08:00
parent 1a54aed0ee
commit 2e8e05494b
12 changed files with 1630 additions and 15 deletions
+15 -2
View File
@@ -1,6 +1,19 @@
cmake_minimum_required(VERSION 4.3)
cmake_minimum_required(VERSION 3.10)
project(DataRouter C)
set(CMAKE_C_STANDARD 11)
add_library(DataRouter STATIC library.c)
add_library(DataRouter STATIC datarouter.c)
target_include_directories(DataRouter PUBLIC ${CMAKE_CURRENT_SOURCE_DIR})
if(BUILD_EXAMPLES OR NOT DEFINED BUILD_EXAMPLES)
add_executable(example example.c)
target_link_libraries(example DataRouter)
endif()
if(BUILD_TESTING OR NOT DEFINED BUILD_TESTING)
enable_testing()
add_executable(test_datarouter tests/test_datarouter.c)
target_link_libraries(test_datarouter DataRouter)
add_test(NAME datarouter COMMAND test_datarouter)
endif()