easyblock = 'CMakeMake'

name = 'Embree'
version = '2.16.2'

homepage = 'https://embree.github.io/index.html'
description = """
	Embree is a collection of high-performance ray tracing kernels, developed at Intel."""

toolchain = {'name': 'intel', 'version': '2017a'}

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

builddependencies = [
    ('CMake', '3.8.1', '', True),
]

dependencies = [
    ('tbb', '2017.6.196', '', True),
    ('ispc', '1.9.1', '', True),
    ('freeglut', '3.0.0'),
]

configopts = '-DTBB_INCLUDE_DIR=$TBBROOT/include -DTBB_LIBRARY=$TBBROOT/lib/libtbb.so -DTBB_LIBRARY_MALLOC=$TBBROOT/lib/libtbbmalloc.so'

separate_build_dir = True

modextrapaths = {
    'PATH': ['bin/embree2'],
}

sanity_check_paths = {
    'files': ['lib64/libembree.so'],
    'dirs': ['bin', 'lib64'],
}

moduleclass = 'lib'
