add variant shared to yaml-cpp (#3254)

This commit is contained in:
healther 2017-03-01 23:36:46 +01:00 committed by Adam J. Stewart
parent 20360f6727
commit ffce6e1c4e

View File

@ -33,6 +33,8 @@ class YamlCpp(CMakePackage):
version('0.5.3', '4e47733d98266e46a1a73ae0a72954eb')
variant('shared', default=True,
description='Enable build of shared libraries')
variant('fpic', default=False,
description='Build with position independent code')
@ -46,5 +48,9 @@ def cmake_args(self):
options.extend([
'-DCMAKE_POSITION_INDEPENDENT_CODE:BOOL=true'
])
if '+shared' in spec:
options.append('-DBUILD_SHARED_LIBS=ON')
else:
options.append('-DBUILD_SHARED_LIBS=OFF')
return options