mmg: add vtk variant (#29533)

This commit is contained in:
Carlos Bederián 2022-03-19 13:02:25 -03:00 committed by GitHub
parent 7f3a63aaa6
commit 8c508b530b
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -34,17 +34,17 @@ class Mmg(CMakePackage):
variant('shared', default=True, description='Enables the build of shared libraries')
variant('scotch', default=True, description='Enable SCOTCH library support')
variant('doc', default=False, description='Build documentation')
variant('vtk', default=False, when='@5.5.0:', description='Enable VTK I/O support')
depends_on('scotch', when='+scotch')
depends_on('doxygen', when='+doc')
depends_on('vtk', when='+vtk')
def cmake_args(self):
args = []
if '+scotch' in self.spec:
args.append('-DUSE_SCOTCH=ON')
else:
args.append('-DUSE_SCOTCH=OFF')
args.append(self.define_from_variant('USE_SCOTCH', 'scotch'))
args.append(self.define_from_variant('USE_VTK', 'vtk'))
if '+shared' in self.spec:
args.append('-DLIBMMG3D_SHARED=ON')