Skip to content

Commit e8ac51c

Browse files
committed
update conanfile to propagate
1 parent 08bbba3 commit e8ac51c

File tree

1 file changed

+9
-15
lines changed

1 file changed

+9
-15
lines changed

conanfile.py

Lines changed: 9 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -32,25 +32,20 @@ def set_version(self):
3232
self.version = re.search("set\(CMAKE_PROJECT_VERSION (.+)\)", content).group(1).strip()
3333

3434
def configure(self):
35-
# If we're building static then build the world as static, otherwise
36-
# stuff will probably break.
37-
# If you want your shared build to also build the world as shared, you
38-
# can invoke conan with -o "&:shared=False" -o "*:shared=False",
39-
# possibly with --build=missing or --build=cascade as desired,
40-
# but this is probably not necessary.
41-
if not self.options.shared:
42-
self.options["*"].shared = False
35+
# The shared-ness of grpc and protobuf needs to match our shared-ness or stuff will break
36+
self.options["grpc"].shared = self.options.shared
37+
self.options["protobuf"].shared = self.options.shared
4338

4439
def requirements(self):
45-
self.requires('boost/[>=1.74.0]', transitive_headers=True)
40+
self.requires('boost/[>=1.74.0]', transitive_headers=True, transitive_libs=True)
4641

4742
# The SDK supports older grpc and protobuf, but these are the oldest
4843
# maintained conan packages.
49-
self.requires('grpc/[>=1.48.4]', transitive_headers=True)
50-
self.requires('protobuf/[>=3.17.1]', transitive_headers=True)
44+
self.requires('grpc/[>=1.48.4]', transitive_headers=True, transitive_libs=True)
45+
self.requires('protobuf/[>=3.17.1]', transitive_headers=True, transitive_libs=True)
5146

5247
self.requires('xtensor/[>=0.24.3]', transitive_headers=True)
53-
self.requires('abseil/[>=20230125.3]')
48+
self.requires('abseil/[>=20230125.3]', transitive_libs=True)
5449

5550
def build_requirements(self):
5651
if self.options.offline_proto_generation:
@@ -89,7 +84,7 @@ def package_info(self):
8984
for component in ["viamsdk", "viamapi"]:
9085
self.cpp_info.components[component].set_property("cmake_target_name", "viam-cpp-sdk::{}".format(component))
9186
self.cpp_info.components[component].set_property("pkg_config_name", "viam-cpp-sdk-lib{}".format(component))
92-
self.cpp_info.components[component].requires = ["grpc::grpc++", "protobuf::libprotobuf"]
87+
self.cpp_info.components[component].requires = ["grpc::grpc++", "grpc::grpc++_reflection", "protobuf::libprotobuf"]
9388
if self.settings.os in ["Linux", "FreeBSD"]:
9489
self.cpp_info.components[component].system_libs = ["pthread"]
9590

@@ -117,8 +112,7 @@ def package_info(self):
117112
"xtensor::xtensor",
118113

119114
"viam_rust_utils",
120-
"abseil::absl_strings",
121-
"grpc::grpc++_reflection"
115+
"abseil::absl_strings"
122116
])
123117

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

0 commit comments

Comments
 (0)