add python options to vtk package (#1931)
This commit is contained in:
parent
2966f174ae
commit
a648dc6b33
@ -42,12 +42,16 @@ class Vtk(Package):
|
||||
|
||||
patch("gcc.patch")
|
||||
|
||||
extends('python', when='+python')
|
||||
depends_on('python', when='+python')
|
||||
depends_on('cmake', type='build')
|
||||
depends_on("qt")
|
||||
|
||||
# VTK7 defaults to OpenGL2 rendering backend
|
||||
variant('opengl2', default=True,
|
||||
description='Build with OpenGL instead of OpenGL2 backend')
|
||||
variant('python', default=False,
|
||||
description='Build the python modules')
|
||||
|
||||
def install(self, spec, prefix):
|
||||
def feature_to_bool(feature, on='ON', off='OFF'):
|
||||
@ -59,8 +63,8 @@ def feature_to_bool(feature, on='ON', off='OFF'):
|
||||
cmake_args = [
|
||||
"..",
|
||||
"-DBUILD_SHARED_LIBS=ON",
|
||||
"-DVTK_WRAP_PYTHON=" + ("ON" if "+python" in spec else "OFF"),
|
||||
# Disable wrappers for other languages.
|
||||
"-DVTK_WRAP_PYTHON=OFF",
|
||||
"-DVTK_WRAP_JAVA=OFF",
|
||||
"-DVTK_WRAP_TCL=OFF"]
|
||||
cmake_args.extend(std_cmake_args)
|
||||
|
Loading…
Reference in New Issue
Block a user