Skip to content

Commit 0504fa1

Browse files
authored
RSDK-9740: Make google libraries a private dependency of the SDK (#357)
1 parent 836b8ff commit 0504fa1

File tree

15 files changed

+16
-39
lines changed

15 files changed

+16
-39
lines changed

.github/workflows/release.yml

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -56,7 +56,7 @@ jobs:
5656

5757
- name: Install dependencies
5858
run: |
59-
brew install abseil cmake boost grpc protobuf xtensor
59+
brew install cmake boost grpc protobuf xtensor
6060
brew install pkg-config ninja buf
6161
6262
- name: Setup build directory
@@ -128,7 +128,6 @@ jobs:
128128
gnupg \
129129
gpg \
130130
less \
131-
libabsl-dev \
132131
libboost-all-dev \
133132
libgrpc++-dev \
134133
libprotobuf-dev \
@@ -221,7 +220,6 @@ jobs:
221220
gnupg \
222221
gpg \
223222
less \
224-
libabsl-dev \
225223
libboost-all-dev \
226224
libc-ares-dev \
227225
libgrpc++-dev \

BUILDING.md

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -27,15 +27,15 @@ guide, before continuing further.
2727
The project depends on [CMake](https://cmake.org/) >= 3.25,
2828
[Boost](https://www.boost.org/) >= 1.74, [gRPC](https://grpc.io/) >=
2929
1.30.2, [protobuf](https://protobuf.dev/overview/) >= 3.12.4,
30-
[xtensor](https://github.com/xtensor-stack/xtensor) >= 0.24.3,
31-
[abseil](https://abseil.io/) and on the transitive dependencies of
30+
[xtensor](https://github.com/xtensor-stack/xtensor) >= 0.24.3
31+
and on the transitive dependencies of
3232
those projects.
3333

3434
You will need to install these required dependencies before building
3535
the Viam C++ SDK, preferably by way of your system package manager:
3636

37-
- Debian: `apt-get install cmake build-essential libabsl-dev libboost-all-dev libgrpc++-dev libprotobuf-dev libxtensor-dev`
38-
- MacOS with Homebrew: `brew install abseil cmake boost grpc protobuf xtensor`
37+
- Debian: `apt-get install cmake build-essential libboost-all-dev libgrpc++-dev libprotobuf-dev libxtensor-dev`
38+
- MacOS with Homebrew: `brew install cmake boost grpc protobuf xtensor`
3939

4040
There are also several optional or conditionally required dependencies:
4141

CMakeLists.txt

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -317,17 +317,12 @@ add_custom_target(
317317
)
318318

319319

320-
set(VIAMCPPSDK_ABSL_VERSION_MINIMUM) # Someday?
321320
set(VIAMCPPSDK_BOOST_VERSION_MINIMUM 1.71)
322321
set(VIAMCPPSDK_GRPC_VERSION_MINIMUM 1.30.2)
323322
set(VIAMCPPSDK_PROTOBUF_VERSION_MINIMUM 3.12.4)
324323
set(VIAMCPPSDK_XTL_VERSION_MINIMUM 0.7.2)
325324
set(VIAMCPPSDK_XTENSOR_VERSION_MINIMUM 0.24.3)
326325

327-
# Time to find absl. Note that the version min value is currently empty,
328-
# because absl doesn't use a versioning scheme that works here.
329-
find_package(absl ${VIAMCPPSDK_ABSL_VERSION_MINIMUM} REQUIRED)
330-
331326
# Time to find `BOOST`.
332327
find_package(Boost ${VIAMCPPSDK_BOOST_VERSION_MINIMUM} REQUIRED COMPONENTS headers log program_options)
333328

conanfile.py

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -47,11 +47,11 @@ def requirements(self):
4747

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

5353
self.requires('xtensor/[>=0.24.3]')
54-
self.requires('abseil/[>=20230125.3]', transitive_libs=True)
54+
self.requires('abseil/[>=20230125.3]')
5555

5656
def build_requirements(self):
5757
if self.options.offline_proto_generation:
@@ -94,6 +94,8 @@ def package_info(self):
9494
if self.settings.os in ["Linux", "FreeBSD"]:
9595
self.cpp_info.components[component].system_libs = ["pthread"]
9696

97+
self.cpp_info.components["viamapi"].requires.append("abseil::absl_strings")
98+
9799
if self.settings.os in ["Linux", "FreeBSD"]:
98100
self.cpp_info.components["viamsdk"].system_libs.extend(["dl", "rt"])
99101

@@ -119,8 +121,7 @@ def package_info(self):
119121
"xtensor::xtensor",
120122

121123
"viamapi",
122-
"viam_rust_utils",
123-
"abseil::absl_strings",
124+
"viam_rust_utils"
124125
])
125126

126127
self.cpp_info.components["viamsdk"].frameworks = ["Security"]

etc/docker/base-images/Dockerfile.debian.bookworm

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,6 @@ RUN apt-get -y --no-install-recommends install \
1919
gnupg \
2020
gpg \
2121
less \
22-
libabsl-dev \
2322
libboost-all-dev \
2423
libgrpc++-dev \
2524
libprotobuf-dev \

etc/docker/base-images/Dockerfile.debian.bullseye

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,6 @@ RUN apt-get -y --no-install-recommends install \
1818
gnupg \
1919
gpg \
2020
less \
21-
libabsl-dev \
2221
libboost-all-dev \
2322
libgrpc++-dev \
2423
libprotobuf-dev \

etc/docker/base-images/Dockerfile.debian.sid

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,6 @@ RUN apt-get -y --no-install-recommends install \
1919
gnupg \
2020
gpg \
2121
less \
22-
libabsl-dev \
2322
libboost-all-dev \
2423
libgrpc++-dev \
2524
libprotobuf-dev \

etc/docker/base-images/Dockerfile.ubuntu.jammy

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,6 @@ RUN apt-get -y --no-install-recommends install \
1818
gnupg \
1919
gpg \
2020
less \
21-
libabsl-dev \
2221
libboost-all-dev \
2322
libgrpc++-dev \
2423
libprotobuf-dev \

src/viam/config/viam-cpp-sdkConfig.cmake.in

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,8 +2,6 @@
22

33
include(CMakeFindDependencyMacro)
44

5-
find_dependency(absl)
6-
75
find_dependency(Boost @Boost_VERSION_MAJOR@.@Boost_VERSION_MINOR@ COMPONENTS headers log)
86

97
if (@gRPC_FOUND@)

src/viam/examples/dial_api_key/example_dial_api_key.cpp

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -9,10 +9,6 @@
99

1010
#include <boost/optional.hpp>
1111
#include <boost/program_options.hpp>
12-
#include <grpcpp/channel.h>
13-
#include <grpcpp/client_context.h>
14-
#include <grpcpp/grpcpp.h>
15-
#include <grpcpp/support/status.h>
1612

1713
#include <viam/sdk/robot/client.hpp>
1814
#include <viam/sdk/rpc/dial.hpp>

0 commit comments

Comments
 (0)