opencv : Add GUI support

This commit is contained in:
mwilliammyers 2016-07-13 16:30:28 -06:00
parent 578ddea418
commit 2cde6aaabd

View file

@ -52,6 +52,9 @@ class Opencv(Package):
variant('eigen', default=True, description='Activates support for eigen')
variant('ipp', default=True, description='Activates support for IPP')
variant('cuda', default=False, description='Activates support for CUDA')
variant('gtk', default=False, description='Activates support for GTK')
variant('vtk', default=False, description='Activates support for VTK')
variant('qt', default=False, description='Activates support for QT')
depends_on('zlib')
depends_on('libpng')
@ -63,11 +66,12 @@ class Opencv(Package):
depends_on('eigen', when='+eigen')
depends_on('cuda', when='+cuda')
depends_on('gtkplus', when='+gtk')
depends_on('vtk', when='+vtk')
depends_on('qt', when='+qt')
extends('python')
# FIXME : GUI extensions missing
def install(self, spec, prefix):
cmake_options = []
cmake_options.extend(std_cmake_args)
@ -81,7 +85,18 @@ def install(self, spec, prefix):
'-DWITH_IPP:BOOL=%s' % (
'ON' if '+ipp' in spec else 'OFF'),
'-DWITH_CUDA:BOOL=%s' % (
'ON' if '+cuda' in spec else 'OFF')])
'ON' if '+cuda' in spec else 'OFF'),
'-DWITH_QT:BOOL=%s' % (
'ON' if '+qt' in spec else 'OFF'),
'-DWITH_VTK:BOOL=%s' % (
'ON' if '+vtk' in spec else 'OFF')])
if '^gtkplus@3:' in spec:
cmake_options.extend(['-DWITH_GTK:BOOL=ON',
'-DWITH_GTK_2_X:BOOL=OFF'])
elif '^gtkplus@2:3' in spec:
cmake_options.extend(['-DWITH_GTK:BOOL=OFF',
'-DWITH_GTK_2_X:BOOL=ON'])
python_prefix = spec['python'].prefix
python_lib = python_prefix.lib