SET(ENV{PYTHONPATH} @XDMF_PYTHONPATH_DIRS@)
EXECUTE_PROCESS(
   COMMAND "@PYTHON_EXECUTABLE@" "@XDMF_CURRENT_PYTHON_TEST@" 
   #WORKING_DIRECTORY @LIBRARY_OUTPUT_PATH@
   RESULT_VARIABLE import_res
   OUTPUT_VARIABLE import_output
   ERROR_VARIABLE  import_output
)

MESSAGE("${import_output}")
IF(import_res)
  MESSAGE(SEND_ERROR "${import_res}")
ENDIF(import_res)

SET(ENV{PYTHONPATH} ENV{PYTHONPATH}:@CMAKE_INSTALL_PREFIX@/@XDMF_WRAP_PYTHON_INSTALL_LIB_DIR@:@CMAKE_INSTALL_PREFIX@/@XDMF_WRAP_PYTHON_INSTALL_PY_DIR@)

SET(ENV{LD_LIBRARY_PATH} $ENV{LD_LIBRARY_PATH}:@CMAKE_INSTALL_PREFIX@/@XDMF_WRAP_PYTHON_INSTALL_LIB_DIR@:@CMAKE_INSTALL_PREFIX@/@XDMF_INSTALL_LIB_DIR_CM24@:@VTK_LIBRARY_DIRS@)

EXECUTE_PROCESS(
   COMMAND "@PYTHON_EXECUTABLE@" "@XDMF_CURRENT_PYTHON_TEST@" 
   #WORKING_DIRECTORY @LIBRARY_OUTPUT_PATH@
   RESULT_VARIABLE import_res
   OUTPUT_VARIABLE import_output
   ERROR_VARIABLE  import_output
)

MESSAGE("${import_output}")
IF(import_res)
  MESSAGE(SEND_ERROR "${import_res}")
ENDIF(import_res)

Set Environment Correctly when XDMF_BUILD_VTK
BUG: Set Environment Correctly when XDMF_BUILD_VTK
