summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--var/spack/repos/builtin/packages/protobuf/package.py4
1 files changed, 4 insertions, 0 deletions
diff --git a/var/spack/repos/builtin/packages/protobuf/package.py b/var/spack/repos/builtin/packages/protobuf/package.py
index 7453c11cb6..52bb28b498 100644
--- a/var/spack/repos/builtin/packages/protobuf/package.py
+++ b/var/spack/repos/builtin/packages/protobuf/package.py
@@ -41,6 +41,9 @@ class Protobuf(CMakePackage):
# does not build with CMake:
# version('2.5.0', '9c21577a03adc1879aba5b52d06e25cf')
+ variant('shared', default=True,
+ description='Enables the build of shared libraries')
+
depends_on('zlib')
conflicts('%gcc@:4.6') # Requires c++11
@@ -62,6 +65,7 @@ class Protobuf(CMakePackage):
def cmake_args(self):
args = [
+ '-DBUILD_SHARED_LIBS=%s' % int('+shared' in self.spec),
'-Dprotobuf_BUILD_TESTS:BOOL=OFF',
'-DCMAKE_POSITION_INDEPENDENT_CODE:BOOL=ON'
]