Skip to content
Merged
Show file tree
Hide file tree
Changes from 9 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions conanfile.py
Original file line number Diff line number Diff line change
Expand Up @@ -47,8 +47,8 @@ def requirements(self):

# The SDK supports older grpc and protobuf, but these are the oldest
# maintained conan packages.
self.requires('grpc/[>=1.48.4]', transitive_headers=True)
self.requires('protobuf/[>=3.17.1]', transitive_headers=True)
self.requires('grpc/[>=1.48.4]', transitive_libs=True)
self.requires('protobuf/[>=3.17.1]', transitive_libs=True)

self.requires('xtensor/[>=0.24.3]')
self.requires('abseil/[>=20230125.3]', transitive_libs=True)
Expand Down
1 change: 1 addition & 0 deletions src/viam/examples/dial_api_key/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@ add_executable(example_dial_api_key
target_link_libraries(example_dial_api_key
Boost::program_options
viam-cpp-sdk::viamsdk
${VIAMCPPSDK_GRPCXX_LIBRARIES}
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I don't see any actual use of grpc in this examples sources.

)

install(
Expand Down
4 changes: 2 additions & 2 deletions src/viam/examples/modules/complex/proto/buf.lock
Original file line number Diff line number Diff line change
Expand Up @@ -4,5 +4,5 @@ deps:
- remote: buf.build
owner: googleapis
repository: googleapis
commit: c0913f24652a4cfc95f77d97443a5005
digest: shake256:0ef3248c6235d420fe61f373154adcde6b94e3297f82472b1d8d8c3747240b61b4a10405e2a6f8ac1c98816ac6e690ea7871024aa5ae0e035cd540214667ceed
commit: e93e34f48be043dab55be31b4b47f458
digest: shake256:93dbe51c27606999eef918360df509485a4d272e79aaed6d0016940379a9b06d316fc5228b7b50cca94bb310f34c5fc5955ce7474f655f0d0a224c4121dda3c1
1 change: 1 addition & 0 deletions src/viam/examples/modules/simple/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@ add_executable(simple_module
target_link_libraries(simple_module
PRIVATE Threads::Threads
viam-cpp-sdk::viamsdk
${VIAMCPPSDK_GRPCXX_LIBRARIES}
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm a little surprised that simple_module has a direct link dependency on grpc?

)

install(
Expand Down
1 change: 1 addition & 0 deletions src/viam/examples/modules/tflite/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -44,6 +44,7 @@ if (VIAMCPPSDK_BUILD_TFLITE_EXAMPLE_MODULE)
target_link_libraries(tflite_module
PRIVATE Threads::Threads
PRIVATE viam-cpp-sdk::viamsdk
PRIVATE ${VIAMCPPSDK_GRPCXX_LIBRARIES}
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ditto tflite module dependency on grpc

PRIVATE tensorflowlite_c
)

Expand Down
3 changes: 3 additions & 0 deletions src/viam/examples/project/cmake/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -45,6 +45,8 @@ find_package(Threads REQUIRED)
#
find_package(viam-cpp-sdk CONFIG REQUIRED viamsdk)

find_package(gRPC CONFIG REQUIRED)
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Still needed?

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Oops good catch thank you



# Here we compile the `examle_dial.cpp` and `example_module.cpp` source
# files into executables, but as parts of separate projects rather than
Expand Down Expand Up @@ -72,4 +74,5 @@ target_link_libraries(example_dial

target_link_libraries(example_module
viam-cpp-sdk::viamsdk
gRPC::grpc++
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Same question

)
6 changes: 3 additions & 3 deletions src/viam/sdk/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -236,13 +236,13 @@ target_link_directories(viamsdk
viamcppsdk_link_viam_api(viamsdk PRIVATE)

target_link_libraries(viamsdk
PUBLIC ${VIAMCPPSDK_GRPCXX_LIBRARIES}
PUBLIC ${VIAMCPPSDK_GRPC_LIBRARIES}
PUBLIC ${VIAMCPPSDK_PROTOBUF_LIBRARIES}
PUBLIC Boost::headers
PUBLIC Boost::log
PUBLIC xtensor
PRIVATE ${VIAMCPPSDK_GRPCXX_REFLECTION_LIBRARIES}
PRIVATE ${VIAMCPPSDK_GRPCXX_LIBRARIES}
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🎉

PRIVATE ${VIAMCPPSDK_GRPC_LIBRARIES}
PRIVATE ${VIAMCPPSDK_PROTOBUF_LIBRARIES}
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⬇️ - I have a suspicion there may no longer be any actual direct usage of abseil in viamsdk. Can you please check?

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

happily you're right!

PRIVATE absl::strings
PRIVATE viam_rust_utils
PRIVATE Threads::Threads
Expand Down
1 change: 1 addition & 0 deletions test_package/conanfile.py
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@ class viamCppSdkTest(ConanFile):

def requirements(self):
self.requires(self.tested_reference_str)
self.requires('grpc/[>=1.48.4]')

def build(self):
cmake = CMake(self)
Expand Down
Loading