opencv : Add optional jdk dependency

This commit is contained in:
mwilliammyers 2016-07-18 15:26:38 -06:00
parent da2b695f93
commit d3b97227a1

View file

@ -58,6 +58,8 @@ class Opencv(Package):
variant('qt', default=False, description='Activates support for QT') variant('qt', default=False, description='Activates support for QT')
variant('python', default=False, variant('python', default=False,
description='Enables the build of Python extensions') description='Enables the build of Python extensions')
variant('java', default=False,
description='Activates support for Java')
depends_on('zlib') depends_on('zlib')
depends_on('libpng') depends_on('libpng')
@ -69,6 +71,7 @@ class Opencv(Package):
depends_on('gtkplus', when='+gtk') depends_on('gtkplus', when='+gtk')
depends_on('vtk', when='+vtk') depends_on('vtk', when='+vtk')
depends_on('qt', when='+qt') depends_on('qt', when='+qt')
depends_on('jdk', when='+java')
depends_on('py-numpy', when='+python') depends_on('py-numpy', when='+python')
@ -91,7 +94,9 @@ def install(self, spec, prefix):
'-DWITH_QT:BOOL={0}'.format(( '-DWITH_QT:BOOL={0}'.format((
'ON' if '+qt' in spec else 'OFF')), 'ON' if '+qt' in spec else 'OFF')),
'-DWITH_VTK:BOOL={0}'.format(( '-DWITH_VTK:BOOL={0}'.format((
'ON' if '+vtk' in spec else 'OFF')) 'ON' if '+vtk' in spec else 'OFF')),
'-DBUILD_opencv_java:BOOL={0}'.format((
'ON' if '+java' in spec else 'OFF')),
]) ])
if '+gtk' not in spec: if '+gtk' not in spec: