+## Generation of the list of VTK classes (to be wrapped into IDLs)
+## =====================================
+IF(NOT SALOME_LIGHT_ONLY AND NOT SALOME_PARAVIS_MINIMAL_CORBA)
+ ADD_DEFINITIONS(-DPARAVIS_WITH_FULL_CORBA)
+ # TODO: the below requires ParaView in the PYTHONPATH ... not so nice:
+ MESSAGE(STATUS "Generating list of wrapped VTK classes ...")
+ LIST(GET PARAVIEW_INCLUDE_DIRS 0 PARAVIEW_INCLUDE_DIR0)
+ EXECUTE_PROCESS(COMMAND ${PYTHON_EXECUTABLE} ${PROJECT_SOURCE_DIR}/src/VTKWrapping/getwrapclasses.py ${PARAVIEW_INCLUDE_DIR0}
+ RESULT_VARIABLE _res)
+ IF(NOT _res EQUAL 0)
+ MESSAGE(FATAL_ERROR "Unable to run the Python script retrieving the list of VTK classes.")
+ ENDIF()
+ENDIF()
+
+# Accumulate environment variables for PARAVIS module
+SALOME_ACCUMULATE_ENVIRONMENT(PYTHONPATH NOCHECK ${CMAKE_INSTALL_PREFIX}/${SALOME_INSTALL_BINS}
+ ${CMAKE_INSTALL_PREFIX}/${SALOME_INSTALL_PYTHON})
+SALOME_ACCUMULATE_ENVIRONMENT(LD_LIBRARY_PATH NOCHECK ${CMAKE_INSTALL_PREFIX}/${SALOME_INSTALL_LIBS})
+SALOME_ACCUMULATE_ENVIRONMENT(PV_PLUGIN_PATH NOCHECK ${CMAKE_INSTALL_PREFIX}/lib/paraview)
+