added jpeg,png,ffmpeg variants to lammps (#10404)
This commit is contained in:
parent
16530f84be
commit
4f2144a68e
@ -59,6 +59,12 @@ def url_for_version(self, version):
|
||||
description='Build the liblammps in addition to the executable')
|
||||
variant('mpi', default=True,
|
||||
description='Build with mpi')
|
||||
variant('jpeg', default=True,
|
||||
description='Build with jpeg support')
|
||||
variant('png', default=True,
|
||||
description='Build with png support')
|
||||
variant('ffmpeg', default=True,
|
||||
description='Build with ffmpeg support')
|
||||
variant('openmp', default=True, description='Build with OpenMP')
|
||||
variant('exceptions', default=False,
|
||||
description='Build with lammps exceptions')
|
||||
@ -79,6 +85,9 @@ def url_for_version(self, version):
|
||||
depends_on('mpi', when='+user-lb')
|
||||
depends_on('mpi', when='+user-h5md')
|
||||
depends_on('hdf5', when='+user-h5md')
|
||||
depends_on('libjpeg', when='+jpeg')
|
||||
depends_on('libpng', when='+png')
|
||||
depends_on('ffmpeg', when='+ffmpeg')
|
||||
|
||||
conflicts('+body', when='+poems@:20180628')
|
||||
conflicts('+latte', when='@:20170921')
|
||||
@ -119,6 +128,13 @@ def cmake_args(self):
|
||||
if spec.satisfies('@20180629:+lib'):
|
||||
args.append('-DBUILD_LIB=ON')
|
||||
|
||||
args.append('-DWITH_JPEG={0}'.format(
|
||||
'ON' if '+jpeg' in spec else 'OFF'))
|
||||
args.append('-DWITH_PNG={0}'.format(
|
||||
'ON' if '+png' in spec else 'OFF'))
|
||||
args.append('-DWITH_FFMPEG={0}'.format(
|
||||
'ON' if '+ffmpeg' in spec else 'OFF'))
|
||||
|
||||
for pkg in self.supported_packages:
|
||||
opt = '-D{0}_{1}'.format(pkg_prefix, pkg.upper())
|
||||
if '+{0}'.format(pkg) in spec:
|
||||
|
Loading…
Reference in New Issue
Block a user