icet: add variants to enable 'opengl' and shared libraries. (#27281)

This commit is contained in:
Gilles Grospellier 2022-02-11 10:26:29 +01:00 committed by GitHub
parent a783f92fba
commit bb3a1dc7a5
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -17,10 +17,15 @@ class Icet(CMakePackage):
version('develop', branch='master')
version('2.1.1', sha256='04cc5b7aa5b3ec95b255febdcfc2312e553ce3db5ca305526803d5737561ec32')
variant('opengl', default=False, description="Use opengl")
variant('shared', default=True, description='Enable shared library')
depends_on('mpi')
depends_on('gl', when="+opengl")
def cmake_args(self):
return ['-DICET_USE_OPENGL:BOOL=OFF']
return [self.define_from_variant("ICET_USE_OPENGL", "opengl"),
self.define_from_variant("BUILD_SHARED_LIBS", "shared")]
def setup_dependent_build_environment(self, env, dependent_spec):
"""Work-around for ill-placed CMake modules"""