Skip to content

Commit

Permalink
Provide a single library per-component. (#93)
Browse files Browse the repository at this point in the history
Too many circular dependencies to care about.
  • Loading branch information
szmyd authored Jul 25, 2024
1 parent 7ed58b9 commit 900f6ef
Show file tree
Hide file tree
Showing 5 changed files with 9 additions and 8 deletions.
4 changes: 2 additions & 2 deletions conanfile.py
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@

class NuRaftMesgConan(ConanFile):
name = "nuraft_mesg"
version = "3.5.5"
version = "3.5.6"

homepage = "https://github.com/eBay/nuraft_mesg"
description = "A gRPC service for NuRAFT"
Expand Down Expand Up @@ -109,7 +109,7 @@ def package(self):
copy(self, "*.so*", self.build_folder, lib_dir, keep_path=False)

def package_info(self):
self.cpp_info.components["proto"].libs = ["nuraft_mesg", "nuraft_mesg_proto"]
self.cpp_info.components["proto"].libs = ["nuraft_mesg_proto"]
self.cpp_info.components["proto"].set_property("pkg_config_name", "libnuraft_mesg_proto")
self.cpp_info.components["proto"].requires.extend([
"nuraft::nuraft",
Expand Down
1 change: 1 addition & 0 deletions src/flatb/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@ add_library(${PROJECT_NAME}_flatb)
target_sources(${PROJECT_NAME}_flatb PRIVATE
flatb_client.cpp
$<TARGET_PROPERTY:fbservice,INTERFACE_SOURCES>
$<TARGET_OBJECTS:${PROJECT_NAME}-core>
)
target_include_directories(${PROJECT_NAME}_flatb PRIVATE
$<TARGET_PROPERTY:fbschemas,INTERFACE_INCLUDE_DIRECTORIES>
Expand Down
6 changes: 3 additions & 3 deletions src/lib/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -1,14 +1,14 @@
cmake_minimum_required(VERSION 3.11)

add_library(${PROJECT_NAME})
target_sources(${PROJECT_NAME} PRIVATE
add_library(${PROJECT_NAME}-core OBJECT)
target_sources(${PROJECT_NAME}-core PRIVATE
manager_impl.cpp
factory.cpp
repl_service_ctx.cpp
service.cpp
grpc_server.cpp
)
target_link_libraries(${PROJECT_NAME}
target_link_libraries(${PROJECT_NAME}-core
sisl::sisl
nuraft::nuraft
)
Expand Down
1 change: 1 addition & 0 deletions src/proto/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,7 @@ target_sources(${PROJECT_NAME}_proto PRIVATE
proto_service.cpp
$<TARGET_OBJECTS:${PROJECT_NAME}-proto-specs>
$<TARGET_OBJECTS:${PROJECT_NAME}-data-svc>
$<TARGET_OBJECTS:${PROJECT_NAME}-core>
)
target_link_libraries(${PROJECT_NAME}_proto
sisl::sisl
Expand Down
5 changes: 2 additions & 3 deletions src/tests/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,8 @@ target_sources(test_fixture PRIVATE
test_state_manager.cpp
)
target_link_libraries(test_fixture
${PROJECT_NAME}
sisl::sisl
nuraft::nuraft
jungle::jungle
GTest::gmock
)
Expand All @@ -21,7 +22,6 @@ target_sources(raft_service_test PRIVATE
$<TARGET_OBJECTS:jungle_logstore>
)
target_link_libraries (raft_service_test
${PROJECT_NAME}
${PROJECT_NAME}_proto
jungle::jungle
GTest::gmock
Expand All @@ -36,7 +36,6 @@ target_sources(data_service_test PRIVATE
$<TARGET_OBJECTS:jungle_logstore>
)
target_link_libraries (data_service_test
${PROJECT_NAME}
${PROJECT_NAME}_proto
jungle::jungle
GTest::gmock
Expand Down

0 comments on commit 900f6ef

Please sign in to comment.