From 90b3f7f2594891e45094dce06e2c8c5bb75627c4 Mon Sep 17 00:00:00 2001 From: Tim Moon Date: Tue, 8 Dec 2020 07:52:57 -0800 Subject: Make sure py-protobuf package can link to libprotobuf when building (#20280) --- var/spack/repos/builtin/packages/py-protobuf/package.py | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/var/spack/repos/builtin/packages/py-protobuf/package.py b/var/spack/repos/builtin/packages/py-protobuf/package.py index 4876832dcf..7cacda0416 100644 --- a/var/spack/repos/builtin/packages/py-protobuf/package.py +++ b/var/spack/repos/builtin/packages/py-protobuf/package.py @@ -57,6 +57,11 @@ class PyProtobuf(PythonPackage): else: return '.' + @when('+cpp') + def setup_build_environment(self, env): + protobuf_dir = self.spec['protobuf'].libs.directories[0] + env.prepend_path('LIBRARY_PATH', protobuf_dir) + @when('+cpp') def build_args(self, spec, prefix): return ['--cpp_implementation'] -- cgit v1.2.3-70-g09d2