snappy: Build shared library by default (#5534)
This commit is contained in:
parent
aa40509fa0
commit
97bc86d617
1 changed files with 14 additions and 0 deletions
|
@ -33,6 +33,20 @@ class Snappy(CMakePackage):
|
||||||
|
|
||||||
version('1.1.7', 'ee9086291c9ae8deb4dac5e0b85bf54a')
|
version('1.1.7', 'ee9086291c9ae8deb4dac5e0b85bf54a')
|
||||||
|
|
||||||
|
variant('shared', default=True, description='Build shared libraries')
|
||||||
|
|
||||||
|
def cmake_args(self):
|
||||||
|
spec = self.spec
|
||||||
|
|
||||||
|
args = [
|
||||||
|
'-DCMAKE_INSTALL_LIBDIR:PATH={0}'.format(
|
||||||
|
self.prefix.lib),
|
||||||
|
'-DBUILD_SHARED_LIBS:BOOL={0}'.format(
|
||||||
|
'ON' if '+shared' in spec else 'OFF')
|
||||||
|
]
|
||||||
|
|
||||||
|
return args
|
||||||
|
|
||||||
@run_after('install')
|
@run_after('install')
|
||||||
def install_pkgconfig(self):
|
def install_pkgconfig(self):
|
||||||
mkdirp(self.prefix.lib.pkgconfig)
|
mkdirp(self.prefix.lib.pkgconfig)
|
||||||
|
|
Loading…
Reference in a new issue