# Configured file and directory locations.
SET(PYTHON_EXECUTABLE "@PYTHON_EXECUTABLE@")
SET(CMAKE_INSTALL_PREFIX "@CMAKE_INSTALL_PREFIX@")
SET(VTK_BINARY_DIR "@VTK_BINARY_DIR@")

# Convert the prefix to a windows path if necessary.  The python
# distutils implementation seems sensitive to the slash direction.
IF(WIN32)
  IF(NOT CYGWIN)
    STRING(REGEX REPLACE "/" "\\\\" CMAKE_INSTALL_PREFIX
      "${CMAKE_INSTALL_PREFIX}")
  ENDIF(NOT CYGWIN)
ENDIF(WIN32)

# Run python on setup.py to install the python modules.
EXEC_PROGRAM("${PYTHON_EXECUTABLE}" "${VTK_BINARY_DIR}/Wrapping/Python" ARGS
  "setup.py" "install" @VTK_PYTHON_SETUP_BUILD_TYPE@ @VTK_PYTHON_SETUP_ARGS@
  )
