Skip to content

Commit 2f85c71

Browse files
authored
Merge branch 'main' into remove-notice
2 parents aa31ce8 + 20c8303 commit 2f85c71

File tree

124 files changed

+2388
-2602
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

124 files changed

+2388
-2602
lines changed

.github/workflows/docs.yml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -4,8 +4,8 @@ on:
44
workflow_dispatch:
55
push:
66
paths:
7-
- 'src/**'
8-
- 'README.md'
7+
- "src/**"
8+
- "README.md"
99
branches: [main]
1010

1111
jobs:
@@ -30,7 +30,7 @@ jobs:
3030
run: doxygen Doxyfile
3131

3232
- name: Upload artifacts
33-
uses: actions/upload-artifact@v3
33+
uses: actions/upload-artifact@v4
3434
with:
3535
name: html-docs
3636
path: etc/docs/api/current

.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: 7 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@
3434
# constrained by the version of CMake available on target systems.
3535
cmake_minimum_required(VERSION 3.25 FATAL_ERROR)
3636

37-
set(CMAKE_PROJECT_VERSION 0.0.16)
37+
set(CMAKE_PROJECT_VERSION 0.0.21)
3838

3939
# Identify the project.
4040
project(viam-cpp-sdk
@@ -194,10 +194,8 @@ set(CMAKE_MODULE_PATH
194194
${CMAKE_MODULE_PATH}
195195
${PROJECT_SOURCE_DIR}/src/viam/cmake
196196
)
197-
if (VIAMCPPSDK_BUILD_TESTS OR VIAMCPPSDK_BUILD_EXAMPLES)
198-
# We maybe could include this unconditionally, but technically only tests or examples need it
199-
include(viamcppsdk_utils)
200-
endif()
197+
198+
include(viamcppsdk_utils)
201199

202200

203201

@@ -319,17 +317,12 @@ add_custom_target(
319317
)
320318

321319

322-
set(VIAMCPPSDK_ABSL_VERSION_MINIMUM) # Someday?
323320
set(VIAMCPPSDK_BOOST_VERSION_MINIMUM 1.71)
324321
set(VIAMCPPSDK_GRPC_VERSION_MINIMUM 1.30.2)
325322
set(VIAMCPPSDK_PROTOBUF_VERSION_MINIMUM 3.12.4)
326323
set(VIAMCPPSDK_XTL_VERSION_MINIMUM 0.7.2)
327324
set(VIAMCPPSDK_XTENSOR_VERSION_MINIMUM 0.24.3)
328325

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

@@ -430,6 +423,10 @@ if ((VIAMCPPSDK_GRPCXX_VERSION VERSION_GREATER 1.51.1) AND (VIAMCPPSDK_PROTOC_VE
430423
set(VIAMCPPSDK_BUF_REMOTE_PLUGIN_SUPPORTED 1)
431424
endif()
432425

426+
if (VIAMCPPSDK_GRPCXX_VERSION VERSION_LESS 1.32.0)
427+
set(VIAMCPPSDK_GRPCXX_LEGACY_FWD 1)
428+
endif()
429+
433430
include(FetchContent)
434431

435432
FetchContent_Declare(

conanfile.py

Lines changed: 7 additions & 6 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

@@ -112,15 +114,14 @@ def package_info(self):
112114
self.cpp_info.components["viamapi"].sharedlinkflags.append(whole_archive)
113115

114116
self.cpp_info.components["viamsdk"].requires.extend([
115-
"viamapi",
116117
"boost::headers",
117118
"boost::log",
118119
"grpc::grpc++_reflection",
119120
"protobuf::libprotobuf",
120121
"xtensor::xtensor",
121122

122-
"viam_rust_utils",
123-
"abseil::absl_strings",
123+
"viamapi",
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/cmake/viamcppsdk_utils.cmake

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -17,3 +17,11 @@ function(viamcppsdk_add_boost_test SOURCE_FILE_NAME)
1717
COMMAND ${TEST_EXECUTABLE_NAME} --catch_system_error=yes)
1818
endforeach()
1919
endfunction()
20+
21+
function(viamcppsdk_link_viam_api TARGET_LIBRARY)
22+
if (BUILD_SHARED_LIBS)
23+
target_link_libraries(${TARGET_LIBRARY} ${ARGV1} viam-cpp-sdk::viamapi)
24+
else()
25+
target_link_libraries(${TARGET_LIBRARY} ${ARGV1} "$<LINK_LIBRARY:WHOLE_ARCHIVE,viam-cpp-sdk::viamapi>")
26+
endif()
27+
endfunction()

0 commit comments

Comments
 (0)