Skip to content

Commit 8fe505f

Browse files
committed
make google a private dep of the sdk and link grpc to examples where needed
1 parent 1448de3 commit 8fe505f

File tree

6 files changed

+11
-5
lines changed

6 files changed

+11
-5
lines changed

src/viam/examples/dial_api_key/CMakeLists.txt

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,7 @@ add_executable(example_dial_api_key
1919
target_link_libraries(example_dial_api_key
2020
Boost::program_options
2121
viam-cpp-sdk::viamsdk
22+
${VIAMCPPSDK_GRPCXX_LIBRARIES}
2223
)
2324

2425
install(

src/viam/examples/modules/complex/proto/buf.lock

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,5 +4,5 @@ deps:
44
- remote: buf.build
55
owner: googleapis
66
repository: googleapis
7-
commit: c0913f24652a4cfc95f77d97443a5005
8-
digest: shake256:0ef3248c6235d420fe61f373154adcde6b94e3297f82472b1d8d8c3747240b61b4a10405e2a6f8ac1c98816ac6e690ea7871024aa5ae0e035cd540214667ceed
7+
commit: e93e34f48be043dab55be31b4b47f458
8+
digest: shake256:93dbe51c27606999eef918360df509485a4d272e79aaed6d0016940379a9b06d316fc5228b7b50cca94bb310f34c5fc5955ce7474f655f0d0a224c4121dda3c1

src/viam/examples/modules/simple/CMakeLists.txt

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,7 @@ add_executable(simple_module
1919
target_link_libraries(simple_module
2020
PRIVATE Threads::Threads
2121
viam-cpp-sdk::viamsdk
22+
${VIAMCPPSDK_GRPCXX_LIBRARIES}
2223
)
2324

2425
install(

src/viam/examples/modules/tflite/CMakeLists.txt

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -44,6 +44,7 @@ if (VIAMCPPSDK_BUILD_TFLITE_EXAMPLE_MODULE)
4444
target_link_libraries(tflite_module
4545
PRIVATE Threads::Threads
4646
PRIVATE viam-cpp-sdk::viamsdk
47+
PRIVATE ${VIAMCPPSDK_GRPCXX_LIBRARIES}
4748
PRIVATE tensorflowlite_c
4849
)
4950

src/viam/examples/project/cmake/CMakeLists.txt

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -45,6 +45,8 @@ find_package(Threads REQUIRED)
4545
#
4646
find_package(viam-cpp-sdk CONFIG REQUIRED viamsdk)
4747

48+
find_package(gRPC CONFIG REQUIRED)
49+
4850

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

7375
target_link_libraries(example_module
7476
viam-cpp-sdk::viamsdk
77+
gRPC::grpc++
7578
)

src/viam/sdk/CMakeLists.txt

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -236,13 +236,13 @@ target_link_directories(viamsdk
236236
viamcppsdk_link_viam_api(viamsdk PRIVATE)
237237

238238
target_link_libraries(viamsdk
239-
PUBLIC ${VIAMCPPSDK_GRPCXX_LIBRARIES}
240-
PUBLIC ${VIAMCPPSDK_GRPC_LIBRARIES}
241-
PUBLIC ${VIAMCPPSDK_PROTOBUF_LIBRARIES}
242239
PUBLIC Boost::headers
243240
PUBLIC Boost::log
244241
PUBLIC xtensor
245242
PRIVATE ${VIAMCPPSDK_GRPCXX_REFLECTION_LIBRARIES}
243+
PRIVATE ${VIAMCPPSDK_GRPCXX_LIBRARIES}
244+
PRIVATE ${VIAMCPPSDK_GRPC_LIBRARIES}
245+
PRIVATE ${VIAMCPPSDK_PROTOBUF_LIBRARIES}
246246
PRIVATE absl::strings
247247
PRIVATE viam_rust_utils
248248
PRIVATE Threads::Threads

0 commit comments

Comments
 (0)