opencv : Minor style changes

This commit is contained in:
mwilliammyers 2016-07-13 18:33:37 -06:00
parent 2cde6aaabd
commit ce902bf27a

View File

@ -76,20 +76,16 @@ def install(self, spec, prefix):
cmake_options = [] cmake_options = []
cmake_options.extend(std_cmake_args) cmake_options.extend(std_cmake_args)
cmake_options.extend( cmake_options.extend([
['-DCMAKE_BUILD_TYPE:STRING=%s' % ( '-DCMAKE_BUILD_TYPE:STRING=%s' % (
'Debug' if '+debug' in spec else 'Release'), 'Debug' if '+debug' in spec else 'Release'),
'-DBUILD_SHARED_LIBS:BOOL=%s' % ( '-DBUILD_SHARED_LIBS:BOOL=%s' % (
'ON' if '+shared' in spec else 'OFF'), 'ON' if '+shared' in spec else 'OFF'),
'-DENABLE_PRECOMPILED_HEADERS:BOOL=OFF', '-DENABLE_PRECOMPILED_HEADERS:BOOL=OFF',
'-DWITH_IPP:BOOL=%s' % ( '-DWITH_IPP:BOOL=%s' % ('ON' if '+ipp' in spec else 'OFF'),
'ON' if '+ipp' in spec else 'OFF'), '-DWITH_CUDA:BOOL=%s' % ('ON' if '+cuda' in spec else 'OFF'),
'-DWITH_CUDA:BOOL=%s' % ( '-DWITH_QT:BOOL=%s' % ('ON' if '+qt' in spec else 'OFF'),
'ON' if '+cuda' in spec else 'OFF'), '-DWITH_VTK:BOOL=%s' % ('ON' if '+vtk' 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: if '^gtkplus@3:' in spec:
cmake_options.extend(['-DWITH_GTK:BOOL=ON', cmake_options.extend(['-DWITH_GTK:BOOL=ON',
@ -103,13 +99,13 @@ def install(self, spec, prefix):
if spec.satisfies('^python@3:'): if spec.satisfies('^python@3:'):
python = join_path(python_prefix.bin, 'python3') python = join_path(python_prefix.bin, 'python3')
cmake_options.extend(['-DBUILD_opencv_python3=ON', cmake_options.extend(['-DBUILD_opencv_python3=ON',
'-DPYTHON_EXECUTABLE=%s' % (python), '-DPYTHON_EXECUTABLE=%s' % python,
'-DPYTHON_LIBRARIES=%s' % (python_lib)]) '-DPYTHON_LIBRARIES=%s' % python_lib])
elif spec.satisfies('^python@2:3'): elif spec.satisfies('^python@2:3'):
python = join_path(python_prefix.bin, 'python2') python = join_path(python_prefix.bin, 'python2')
cmake_options.extend(['-DBUILD_opencv_python2=ON', cmake_options.extend(['-DBUILD_opencv_python2=ON',
'-DPYTHON_EXECUTABLE=%s' % (python), '-DPYTHON_EXECUTABLE=%s' % python,
'-DPYTHON_LIBRARIES=%s' % (python_lib)]) '-DPYTHON_LIBRARIES=%s' % python_lib])
with working_dir('spack_build', create=True): with working_dir('spack_build', create=True):
cmake('..', *cmake_options) cmake('..', *cmake_options)