diff options
-rw-r--r-- | var/spack/repos/builtin/packages/assimp/package.py | 15 |
1 files changed, 14 insertions, 1 deletions
diff --git a/var/spack/repos/builtin/packages/assimp/package.py b/var/spack/repos/builtin/packages/assimp/package.py index 9e3687a95d..01b20b7da9 100644 --- a/var/spack/repos/builtin/packages/assimp/package.py +++ b/var/spack/repos/builtin/packages/assimp/package.py @@ -34,8 +34,21 @@ class Assimp(CMakePackage): version('4.0.1', '23a6301c728a413aafbfa1cca19ba91f') + variant('shared', default=True, + description='Enables the build of shared libraries') + depends_on('boost') def cmake_args(self): - args = ['-DASSIMP_BUILD_TESTS=OFF'] + args = [ + '-DASSIMP_BUILD_TESTS=OFF', + '-DBUILD_SHARED_LIBS:BOOL=%s' % ( + 'ON' if '+shared' in self.spec else 'OFF'), + ] return args + + def flag_handler(self, name, flags): + flags = list(flags) + if name == 'cxxflags': + flags.append(self.compiler.cxx11_flag) + return (None, None, flags) |