diff options
| author | yangwei <[email protected]> | 2024-08-30 15:10:55 +0800 |
|---|---|---|
| committer | yangwei <[email protected]> | 2024-08-30 15:10:55 +0800 |
| commit | ce49357bbc12d96e2f471ab706983ec7dcac44b0 (patch) | |
| tree | c382b8ebb6597e1a29c38681505f88700198ab13 | |
| parent | aa5c41e4d76cd999238c6a608a27453f88f51031 (diff) | |
✨ feat(rename stellar_devel): from stellar_devel to stellar_lib
| -rw-r--r-- | infra/CMakeLists.txt | 13 | ||||
| -rw-r--r-- | test/debug_plugin/CMakeLists.txt | 2 | ||||
| -rw-r--r-- | test/decoders/http/CMakeLists.txt | 4 | ||||
| -rw-r--r-- | test/lpi_plugin/CMakeLists.txt | 2 | ||||
| -rw-r--r-- | test/packet_inject/CMakeLists.txt | 2 |
5 files changed, 12 insertions, 11 deletions
diff --git a/infra/CMakeLists.txt b/infra/CMakeLists.txt index e8862ad..936a483 100644 --- a/infra/CMakeLists.txt +++ b/infra/CMakeLists.txt @@ -7,17 +7,18 @@ foreach(infra ${INFRA}) add_subdirectory(${infra}) endforeach() -file(WRITE ${CMAKE_CURRENT_BINARY_DIR}/stellar_devel.c "") +file(WRITE ${CMAKE_CURRENT_BINARY_DIR}/stellar_lib.c "") -add_library(stellar_devel SHARED stellar_devel.c) -set_target_properties(stellar_devel PROPERTIES LINK_FLAGS "-Wl,--version-script=${CMAKE_CURRENT_LIST_DIR}/version.map") -target_link_libraries(stellar_devel PRIVATE pthread -Wl,--whole-archive ${WHOLE_ARCHIVE} -Wl,--no-whole-archive) -target_link_options(stellar_devel PRIVATE -rdynamic) +add_library(stellar_lib SHARED stellar_lib.c) +set_target_properties(stellar_lib PROPERTIES LINK_FLAGS "-Wl,--version-script=${CMAKE_CURRENT_LIST_DIR}/version.map") +target_link_libraries(stellar_lib PRIVATE pthread -Wl,--whole-archive ${WHOLE_ARCHIVE} -Wl,--no-whole-archive) +target_link_options(stellar_lib PRIVATE -rdynamic) +set_target_properties(stellar_lib PROPERTIES OUTPUT_NAME "stellar") add_executable(stellar main.c) set_target_properties(stellar PROPERTIES LINK_FLAGS "-Wl,--version-script=${CMAKE_CURRENT_LIST_DIR}/version.map") target_link_libraries(stellar PRIVATE pthread -Wl,--whole-archive ${WHOLE_ARCHIVE} -Wl,--no-whole-archive) target_link_options(stellar PRIVATE -rdynamic) -install(TARGETS stellar_devel LIBRARY DESTINATION lib COMPONENT LIBRARIES) +install(TARGETS stellar_lib LIBRARY DESTINATION lib COMPONENT LIBRARIES) install(TARGETS stellar RUNTIME DESTINATION bin COMPONENT PROGRAM)
\ No newline at end of file diff --git a/test/debug_plugin/CMakeLists.txt b/test/debug_plugin/CMakeLists.txt index 19f3159..bfcc4ca 100644 --- a/test/debug_plugin/CMakeLists.txt +++ b/test/debug_plugin/CMakeLists.txt @@ -1,6 +1,6 @@ # build libdebug_plugin.so add_library(debug_plugin SHARED debug_plugin.c) -target_link_libraries(debug_plugin stellar_devel session_manager packet_parser) +target_link_libraries(debug_plugin stellar_lib session_manager packet_parser) target_include_directories(debug_plugin PUBLIC ${CMAKE_SOURCE_DIR}/include/) target_include_directories(debug_plugin PUBLIC ${CMAKE_SOURCE_DIR}/infra/core/utils) set_target_properties(debug_plugin PROPERTIES LINK_FLAGS "-Wl,--version-script=${CMAKE_CURRENT_LIST_DIR}/version.map") diff --git a/test/decoders/http/CMakeLists.txt b/test/decoders/http/CMakeLists.txt index 6d3c757..766e49c 100644 --- a/test/decoders/http/CMakeLists.txt +++ b/test/decoders/http/CMakeLists.txt @@ -21,7 +21,7 @@ include_directories(${PROJECT_SOURCE_DIR}/include/stellar) aux_source_directory(${PROJECT_SOURCE_DIR}/deps/toml PERF_TEST_DEP_SRC) add_executable(gtest_http http_decoder_gtest.cpp ${PROJECT_SOURCE_DIR}/decoders/http/http_decoder_utils.cpp) -target_link_libraries(gtest_http gtest stellar_devel llhttp-static) +target_link_libraries(gtest_http gtest stellar_lib llhttp-static) add_executable(http_test_main plugin_test_main.cpp) set_target_properties(http_test_main @@ -35,7 +35,7 @@ set_target_properties(http_test_main "-rdynamic" ) set(LINK_FLAGS "-rdynamic") -target_link_libraries(http_test_main gtest cjson-static stellar_devel llhttp-static) +target_link_libraries(http_test_main gtest cjson-static stellar_lib llhttp-static) add_subdirectory(test_based_on_stellar) diff --git a/test/lpi_plugin/CMakeLists.txt b/test/lpi_plugin/CMakeLists.txt index 971d587..116ad8f 100644 --- a/test/lpi_plugin/CMakeLists.txt +++ b/test/lpi_plugin/CMakeLists.txt @@ -4,7 +4,7 @@ target_include_directories(gtest_lpi PRIVATE ${CMAKE_SOURCE_DIR}/deps/) target_include_directories(gtest_lpi PRIVATE ${CMAKE_SOURCE_DIR}/decoders/lpi) target_link_libraries( - gtest_lpi PRIVATE stellar_devel cjson-static + gtest_lpi PRIVATE stellar_lib cjson-static dl "-rdynamic" gtest gmock ) diff --git a/test/packet_inject/CMakeLists.txt b/test/packet_inject/CMakeLists.txt index 404fe3e..3e8196d 100644 --- a/test/packet_inject/CMakeLists.txt +++ b/test/packet_inject/CMakeLists.txt @@ -9,7 +9,7 @@ function(packet_inject_add_case EXEC_NAME) add_executable(${EXEC_NAME} ${EXEC_NAME}.cpp) target_include_directories(${EXEC_NAME} PUBLIC ${CMAKE_SOURCE_DIR}/include/) target_link_libraries(${EXEC_NAME} PRIVATE "-rdynamic") - target_link_libraries(${EXEC_NAME} PRIVATE stellar_devel gtest) + target_link_libraries(${EXEC_NAME} PRIVATE stellar_lib gtest) gtest_discover_tests(${EXEC_NAME}) endfunction() |
