easyblock = 'CMakeMake'

name = 'Bullet'
version = '2.83.7'

homepage = "http://bulletphysics.org/"
description = """Bullet professional 3D Game Multiphysics Library provides state
 of the art collision detection, soft body and rigid body dynamics."""

toolchain = {'name': 'intel', 'version': '2016a'}
toolchainopts = {'usempi': False, 'pic': True}

source_urls = ['https://github.com/bulletphysics/bullet3/archive/']
sources = ["%(version)s.tar.gz"]

builddependencies = [('CMake', '3.5.2')]

# build shared libraries
configopts = "-DBUILD_SHARED_LIBS=ON"

sanity_check_paths = {
    'files': ['include/bullet/btBullet%sCommon.h' % x for x in ['Collision', 'Dynamics']]
           + ['lib/libBullet%s.%s' % (x,SHLIB_EXT) for x in ['Collision', 'Dynamics']],
    'dirs': [],
}

modextrapaths = {'CPATH': 'include/bullet'}

moduleclass = 'phys'
