Rmlab: Control PNG (#6846)

Control the find_package of the PNG variant explicitly.
This avoids picking up an "external" PNGwriter install in
case `~png` is picked by changing the default "AUTO" search
to explicit "ON" (required) of "OFF" (ignore if exists).
This commit is contained in:
Axel Huebl 2018-01-08 16:14:38 +01:00 committed by Adam J. Stewart
parent ffd435bad7
commit 298f5562c9

View File

@ -47,3 +47,12 @@ class Rmlab(CMakePackage):
conflicts('%pgi@:14')
depends_on('pngwriter@0.6.0:', when='+png')
def cmake_args(self):
spec = self.spec
args = [
'-DRmlab_USE_PNG={0}'.format(
'ON' if '+png' in spec else 'OFF')
]
return args