summaryrefslogtreecommitdiff
path: root/shaping/CMakeLists.txt
blob: 30ddf4c4a67a8e53c68b5e87016ab48be292a73f (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
add_library(shaper src/shaper_maat.cpp src/shaper_marsio.cpp src/shaper_session.cpp src/shaper_stat.cpp src/shaper_swarmkv.cpp src/shaper.cpp src/shaper_global_stat.cpp src/shaper_aqm.cpp ${PROJECT_SOURCE_DIR}/deps/timeout/timeout.c)
target_link_libraries(shaper PUBLIC common)
target_link_libraries(shaper PUBLIC avl_tree)
target_link_libraries(shaper PUBLIC cjson)
target_link_libraries(shaper PUBLIC MESA_handle_logger)
target_link_libraries(shaper PUBLIC MESA_prof_load)
target_link_libraries(shaper PUBLIC fieldstat4)
target_link_libraries(shaper PUBLIC pthread)
target_include_directories(shaper PUBLIC ${CMAKE_CURRENT_LIST_DIR}/include)
target_include_directories(shaper PUBLIC ${PROJECT_SOURCE_DIR}/deps/timeout)
add_executable(shaping_engine src/main.cpp)
target_link_libraries(shaping_engine PUBLIC shaper)
target_link_libraries(shaping_engine PUBLIC maatframe)
target_link_libraries(shaping_engine PUBLIC mrzcpd)
target_link_libraries(shaping_engine PUBLIC libjemalloc-static dl)
target_link_libraries(shaping_engine PUBLIC swarmkv)
target_link_libraries(shaping_engine PUBLIC rdkafka)

install(TARGETS shaping_engine RUNTIME DESTINATION bin COMPONENT Program)

# 在安装时创建一个子目录log
install(DIRECTORY DESTINATION ${CMAKE_INSTALL_PREFIX}/log)


add_subdirectory(test)