Skip to content

Commit

Permalink
Merge pull request #4 from jcfr/cmake-env-var-support
Browse files Browse the repository at this point in the history
Support passing cmake args to VTK build via env var
  • Loading branch information
jcfr committed Oct 25, 2017
2 parents 752eb95 + a3c47c1 commit d98776f
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 4 deletions.
6 changes: 6 additions & 0 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -56,6 +56,9 @@ if(VTKPythonPackage_SUPERBUILD)
option(VTKPythonPackage_BUILD_PYTHON "Build VTK python module" ON)
mark_as_advanced(VTKPythonPackage_BUILD_PYTHON)

option(VTK_Group_Web "Build VTK web module" OFF)
mark_as_advanced(VTK_Group_Web)


#-----------------------------------------------------------------------------
include(ExternalProject)
Expand Down Expand Up @@ -201,6 +204,9 @@ if(VTKPythonPackage_SUPERBUILD)
-DVTK_Group_Qt:BOOL=OFF # XXX Enabled this later
-DVTK_RENDERING_BACKEND:STRING=OpenGL2

# Module options
-DVTK_Group_Web:BOOL=${VTK_Group_Web}

${ep_common_cmake_cache_args}
USES_TERMINAL_DOWNLOAD 1
USES_TERMINAL_UPDATE 1
Expand Down
10 changes: 6 additions & 4 deletions setup.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,8 @@

from __future__ import print_function
from os import sys, path

import os
import shlex
import sys

try:
from skbuild import setup
Expand All @@ -11,7 +13,7 @@
print(' python -m pip install scikit-build')
sys.exit(1)

sys.path.append(path.dirname(path.dirname(path.abspath(__file__))))
sys.path.append(os.path.dirname(os.path.dirname(os.path.abspath(__file__))))
from vtkVersion import get_versions

setup(
Expand All @@ -21,7 +23,7 @@
author_email='vtk-developers@vtk.org',
packages=['vtk'],
package_dir={'vtk': 'vtk'},
cmake_args=[],
cmake_args=shlex.split(os.environ.get('VTK_CMAKE_ARGS', '')),
py_modules=[
'vtkVersion',
],
Expand Down

0 comments on commit d98776f

Please sign in to comment.