diff -urN ParaView-v4.1.0.old/CMake/CTestCustom.cmake.in ParaView-v4.1.0.new/CMake/CTestCustom.cmake.in
--- ParaView-v4.1.0.old/CMake/CTestCustom.cmake.in	2014-01-11 14:59:57.000000000 +0100
+++ ParaView-v4.1.0.new/CMake/CTestCustom.cmake.in	2014-03-09 00:29:34.000000000 +0100
@@ -1,6 +1,6 @@
 #------------------------------------------------------------------------------
 # Inherit VTK's exclusions. We don't have to redefine them in this file anymore.
-include("@VTK_BINARY_DIR@/CTestCustom.cmake")
+include("@VTK_CMAKE_DIR@/CTestCustom.cmake")
 
 #------------------------------------------------------------------------------
 # Regular expression for warning exception during build process
diff -urN ParaView-v4.1.0.old/CMake/ParaViewModuleTop.cmake ParaView-v4.1.0.new/CMake/ParaViewModuleTop.cmake
--- ParaView-v4.1.0.old/CMake/ParaViewModuleTop.cmake	2014-01-11 14:59:57.000000000 +0100
+++ ParaView-v4.1.0.new/CMake/ParaViewModuleTop.cmake	2014-03-09 00:29:34.000000000 +0100
@@ -280,7 +280,11 @@
 
   #message("vtk-module = ${vtk-module}")
   include("${${_module}_SOURCE_DIR}/vtk-module-init.cmake" OPTIONAL)
-  add_subdirectory("${${_module}_SOURCE_DIR}" "${${_module}_BINARY_DIR}")
+  if("${${_module}_SOURCE_DIR}" STREQUAL "${${_module}_BINARY_DIR}")
+    message(WARNING "\nmodule ${_module} seems not installed\n")
+  else()
+    add_subdirectory("${${_module}_SOURCE_DIR}" "${${_module}_BINARY_DIR}")
+  endif()
 endforeach()
 
 vtk_module_config(VTK ${VTK_MODULES_ENABLED})
diff -urN ParaView-v4.1.0.old/CMake/ParaViewTestInstall.cmake ParaView-v4.1.0.new/CMake/ParaViewTestInstall.cmake
--- ParaView-v4.1.0.old/CMake/ParaViewTestInstall.cmake	2014-01-11 14:59:57.000000000 +0100
+++ ParaView-v4.1.0.new/CMake/ParaViewTestInstall.cmake	2014-03-09 00:29:34.000000000 +0100
@@ -40,9 +40,11 @@
 # PARAVIEW_TEST_DIR : Temporary directory for location of Examples build tree
 # PARAVIEW_VERSION : ParaView version string used when creating the installtree
 
+set (ENV{DESTDIR} ${PARAVIEW_TEST_DIR}/test-install)
+
 message (STATUS "Building Examples against ParaView install tree")
 set (ParaView_DIR
-  ${PARAVIEW_INSTALL_DIR}/lib/cmake/paraview-${PARAVIEW_VERSION})
+  $ENV{DESTDIR}${PARAVIEW_INSTALL_DIR}/lib/cmake/paraview-${PARAVIEW_VERSION})
 
 # Build target "INSTALL" for paraview
 if (MSVC)
@@ -62,6 +64,10 @@
   message(FATAL_ERROR "Could not build target 'install' for ParaView")
 endif ()
 
+# we have not done a final install so let's get the correct ParaViewConfig.cmake
+execute_process (COMMAND ${CMAKE_COMMAND}
+	-E copy ${PARAVIEW_BINARY_DIR}/ParaViewConfig.cmake ${ParaView_DIR})
+
 set (INSTALL_TEST_BUILD_DIR ${PARAVIEW_TEST_DIR}/Examples-bld)
 if (NOT EXISTS ${INSTALL_TEST_BUILD_DIR})
   execute_process(COMMAND ${CMAKE_COMMAND} -E
@@ -69,7 +75,7 @@
 endif ()
 execute_process (
   COMMAND ${CMAKE_COMMAND}
-  -DParaView_DIR:PATH=${PARAVIEW_INSTALL_DIR}/lib/cmake/paraview-${PARAVIEW_VERSION}
+  -DParaView_DIR:PATH=${ParaView_DIR}
   ${PARAVIEW_SOURCE_DIR}/Examples
   WORKING_DIRECTORY ${INSTALL_TEST_BUILD_DIR}
   RESULT_VARIABLE crv)
diff -urN ParaView-v4.1.0.old/CMakeLists.txt ParaView-v4.1.0.new/CMakeLists.txt
--- ParaView-v4.1.0.old/CMakeLists.txt	2014-01-11 14:59:57.000000000 +0100
+++ ParaView-v4.1.0.new/CMakeLists.txt	2014-03-09 00:29:34.000000000 +0100
@@ -503,6 +503,10 @@
   # location.
   set (VTK_MODULES_DIR ${PARAVIEW_MODULES_DIR})
 
+  find_file(VTK_CONFIG_FILE "VTKConfig.cmake" ${VTK_CMAKE_DIR})
+
+  # vtk_module_library points to ${VTK_SOURCE_DIR} for add_test() calls
+  set (VTK_SOURCE_DIR ${ParaView_SOURCE_DIR}/VTK)
 else()
 
   # Update CMAKE_MODULE_PATH to include VTK's cmake files.
@@ -529,6 +533,7 @@
   set(VTK_Group_StandAlone OFF CACHE BOOL "" FORCE)
   set(VTK_Group_Rendering OFF CACHE BOOL "" FORCE)
 
+  set(VTK_CONFIG_FILE "${ParaView_BINARY_DIR}/VTK/VTKConfig.cmake")
 endif()
 
 #----------------------------------------------------------------------------------
@@ -567,6 +572,9 @@
   )
 endif()
 
+if ( ${PARAVIEW_ENABLE_PYTHON} )
+  find_package(PythonLibs)
+endif ( ${PARAVIEW_ENABLE_PYTHON} )
 include(ParaViewModuleTop)
 
 #----------------------------------------------------------------------------------
diff -urN ParaView-v4.1.0.old/Examples/CustomApplications/Clone1/CMakeLists.txt ParaView-v4.1.0.new/Examples/CustomApplications/Clone1/CMakeLists.txt
--- ParaView-v4.1.0.old/Examples/CustomApplications/Clone1/CMakeLists.txt	2014-01-11 14:59:57.000000000 +0100
+++ ParaView-v4.1.0.new/Examples/CustomApplications/Clone1/CMakeLists.txt	2014-03-09 00:29:34.000000000 +0100
@@ -1,8 +1,10 @@
 cmake_minimum_required(VERSION 2.8.8 FATAL_ERROR)
 project(Clone1)
 
-FIND_PACKAGE(ParaView REQUIRED)
-INCLUDE(${PARAVIEW_USE_FILE})
+IF (NOT ParaViewExamples_BINARY_DIR)
+  FIND_PACKAGE(ParaView REQUIRED)
+  INCLUDE(${PARAVIEW_USE_FILE})
+ENDIF (NOT ParaViewExamples_BINARY_DIR)
 if (NOT PARAVIEW_BUILD_QT_GUI)
   message(FATAL_ERROR
     "Clone1 example requires PARAVIEW_BUILD_QT_GUI to be enabled. "
diff -urN ParaView-v4.1.0.old/Examples/CustomApplications/Clone2/CMakeLists.txt ParaView-v4.1.0.new/Examples/CustomApplications/Clone2/CMakeLists.txt
--- ParaView-v4.1.0.old/Examples/CustomApplications/Clone2/CMakeLists.txt	2014-01-11 14:59:57.000000000 +0100
+++ ParaView-v4.1.0.new/Examples/CustomApplications/Clone2/CMakeLists.txt	2014-03-09 00:29:34.000000000 +0100
@@ -1,8 +1,10 @@
 cmake_minimum_required(VERSION 2.8.8)
 project(Clone2)
 
-FIND_PACKAGE(ParaView REQUIRED)
-INCLUDE(${PARAVIEW_USE_FILE})
+IF (NOT ParaViewExamples_BINARY_DIR)
+  FIND_PACKAGE(ParaView REQUIRED)
+  INCLUDE(${PARAVIEW_USE_FILE})
+ENDIF (NOT ParaViewExamples_BINARY_DIR)
 if (NOT PARAVIEW_BUILD_QT_GUI)
   message(FATAL_ERROR
     "Clone2 example requires PARAVIEW_BUILD_QT_GUI to be enabled. "
diff -urN ParaView-v4.1.0.old/Examples/CustomApplications/Demo0/CMakeLists.txt ParaView-v4.1.0.new/Examples/CustomApplications/Demo0/CMakeLists.txt
--- ParaView-v4.1.0.old/Examples/CustomApplications/Demo0/CMakeLists.txt	2014-01-11 14:59:57.000000000 +0100
+++ ParaView-v4.1.0.new/Examples/CustomApplications/Demo0/CMakeLists.txt	2014-03-09 00:29:34.000000000 +0100
@@ -1,8 +1,10 @@
 cmake_minimum_required(VERSION 2.8.8)
 project(Demo0)
 
-find_package(ParaView REQUIRED)
-include(${PARAVIEW_USE_FILE})
+IF (NOT ParaViewExamples_BINARY_DIR)
+  FIND_PACKAGE(ParaView REQUIRED)
+  INCLUDE(${PARAVIEW_USE_FILE})
+ENDIF (NOT ParaViewExamples_BINARY_DIR)
 if (NOT PARAVIEW_BUILD_QT_GUI)
   message(FATAL_ERROR
     "Demo0 example requires PARAVIEW_BUILD_QT_GUI to be enabled. "
diff -urN ParaView-v4.1.0.old/Examples/CustomApplications/Demo1/CMakeLists.txt ParaView-v4.1.0.new/Examples/CustomApplications/Demo1/CMakeLists.txt
--- ParaView-v4.1.0.old/Examples/CustomApplications/Demo1/CMakeLists.txt	2014-01-11 14:59:57.000000000 +0100
+++ ParaView-v4.1.0.new/Examples/CustomApplications/Demo1/CMakeLists.txt	2014-03-09 00:29:34.000000000 +0100
@@ -1,8 +1,10 @@
 cmake_minimum_required(VERSION 2.8.8)
 project(Demo1)
 
-find_package(ParaView REQUIRED)
-include(${PARAVIEW_USE_FILE})
+IF (NOT ParaViewExamples_BINARY_DIR)
+  FIND_PACKAGE(ParaView REQUIRED)
+  INCLUDE(${PARAVIEW_USE_FILE})
+ENDIF (NOT ParaViewExamples_BINARY_DIR)
 if (NOT PARAVIEW_BUILD_QT_GUI)
   message(FATAL_ERROR
     "Demo1 example requires PARAVIEW_BUILD_QT_GUI to be enabled. "
diff -urN ParaView-v4.1.0.old/Examples/CustomApplications/MultiServerClient/CMakeLists.txt ParaView-v4.1.0.new/Examples/CustomApplications/MultiServerClient/CMakeLists.txt
--- ParaView-v4.1.0.old/Examples/CustomApplications/MultiServerClient/CMakeLists.txt	2014-01-11 14:59:57.000000000 +0100
+++ ParaView-v4.1.0.new/Examples/CustomApplications/MultiServerClient/CMakeLists.txt	2014-03-09 00:29:34.000000000 +0100
@@ -32,8 +32,10 @@
 cmake_minimum_required(VERSION 2.8.8)
 project(MultiServerClient)
 
-find_package(ParaView REQUIRED)
-include(${PARAVIEW_USE_FILE})
+IF (NOT ParaViewExamples_BINARY_DIR)
+  FIND_PACKAGE(ParaView REQUIRED)
+  INCLUDE(${PARAVIEW_USE_FILE})
+ENDIF (NOT ParaViewExamples_BINARY_DIR)
 if (NOT PARAVIEW_BUILD_QT_GUI)
   message(FATAL_ERROR
     "MultiServerClient example requires PARAVIEW_BUILD_QT_GUI to be enabled. "
diff -urN ParaView-v4.1.0.old/Examples/CustomApplications/ParticlesViewer/CMakeLists.txt ParaView-v4.1.0.new/Examples/CustomApplications/ParticlesViewer/CMakeLists.txt
--- ParaView-v4.1.0.old/Examples/CustomApplications/ParticlesViewer/CMakeLists.txt	2014-01-11 14:59:57.000000000 +0100
+++ ParaView-v4.1.0.new/Examples/CustomApplications/ParticlesViewer/CMakeLists.txt	2014-03-09 00:29:34.000000000 +0100
@@ -1,8 +1,10 @@
 cmake_minimum_required(VERSION 2.8.8)
 project(ParticlesViewer)
 
-find_package(ParaView REQUIRED)
-include(${PARAVIEW_USE_FILE})
+IF (NOT ParaViewExamples_BINARY_DIR)
+  FIND_PACKAGE(ParaView REQUIRED)
+  INCLUDE(${PARAVIEW_USE_FILE})
+ENDIF (NOT ParaViewExamples_BINARY_DIR)
 if (NOT PARAVIEW_BUILD_QT_GUI)
   message(FATAL_ERROR
     "ParticlesViewer example requires PARAVIEW_BUILD_QT_GUI to be enabled. "
diff -urN ParaView-v4.1.0.old/Examples/CustomApplications/Spreadsheet/CMakeLists.txt ParaView-v4.1.0.new/Examples/CustomApplications/Spreadsheet/CMakeLists.txt
--- ParaView-v4.1.0.old/Examples/CustomApplications/Spreadsheet/CMakeLists.txt	2014-01-11 14:59:57.000000000 +0100
+++ ParaView-v4.1.0.new/Examples/CustomApplications/Spreadsheet/CMakeLists.txt	2014-03-09 00:29:34.000000000 +0100
@@ -1,8 +1,10 @@
 cmake_minimum_required(VERSION 2.8.8)
 project(SpreadSheet)
 
-find_package(ParaView REQUIRED)
-include(${PARAVIEW_USE_FILE})
+IF (NOT ParaViewExamples_BINARY_DIR)
+  FIND_PACKAGE(ParaView REQUIRED)
+  INCLUDE(${PARAVIEW_USE_FILE})
+ENDIF (NOT ParaViewExamples_BINARY_DIR)
 if (NOT PARAVIEW_BUILD_QT_GUI)
   message(FATAL_ERROR
     "SpreadSheet example requires PARAVIEW_BUILD_QT_GUI to be enabled. "
diff -urN ParaView-v4.1.0.old/Examples/Plugins/Autostart/CMakeLists.txt ParaView-v4.1.0.new/Examples/Plugins/Autostart/CMakeLists.txt
--- ParaView-v4.1.0.old/Examples/Plugins/Autostart/CMakeLists.txt	2014-01-11 14:59:57.000000000 +0100
+++ ParaView-v4.1.0.new/Examples/Plugins/Autostart/CMakeLists.txt	2014-03-09 00:29:34.000000000 +0100
@@ -3,10 +3,10 @@
 
 CMAKE_MINIMUM_REQUIRED(VERSION 2.4)
 
-IF(NOT ParaView_BINARY_DIR)
+IF(NOT ParaViewExamples_BINARY_DIR)
   FIND_PACKAGE(ParaView REQUIRED)
   INCLUDE(${PARAVIEW_USE_FILE})
-ENDIF(NOT ParaView_BINARY_DIR)
+ENDIF (NOT ParaViewExamples_BINARY_DIR)
 
 QT4_WRAP_CPP(MOC_SRCS pqMyApplicationStarter.h)
 
diff -urN ParaView-v4.1.0.old/Examples/Plugins/DisplayPanelDecorator/CMakeLists.txt ParaView-v4.1.0.new/Examples/Plugins/DisplayPanelDecorator/CMakeLists.txt
--- ParaView-v4.1.0.old/Examples/Plugins/DisplayPanelDecorator/CMakeLists.txt	2014-01-11 14:59:57.000000000 +0100
+++ ParaView-v4.1.0.new/Examples/Plugins/DisplayPanelDecorator/CMakeLists.txt	2014-03-09 00:29:34.000000000 +0100
@@ -4,10 +4,10 @@
 
 CMAKE_MINIMUM_REQUIRED(VERSION 2.4)
 
-IF(NOT ParaView_BINARY_DIR)
+IF(NOT ParaViewExamples_BINARY_DIR)
   FIND_PACKAGE(ParaView REQUIRED)
   INCLUDE(${PARAVIEW_USE_FILE})
-ENDIF(NOT ParaView_BINARY_DIR)
+ENDIF (NOT ParaViewExamples_BINARY_DIR)
 
 IF(PARAVIEW_BUILD_QT_GUI)
   QT4_WRAP_CPP(MOC_SRCS pqMyPanelDecorator.h)
diff -urN ParaView-v4.1.0.old/Examples/Plugins/DockWidget/CMakeLists.txt ParaView-v4.1.0.new/Examples/Plugins/DockWidget/CMakeLists.txt
--- ParaView-v4.1.0.old/Examples/Plugins/DockWidget/CMakeLists.txt	2014-01-11 14:59:57.000000000 +0100
+++ ParaView-v4.1.0.new/Examples/Plugins/DockWidget/CMakeLists.txt	2014-03-09 00:29:34.000000000 +0100
@@ -4,10 +4,10 @@
 
 CMAKE_MINIMUM_REQUIRED(VERSION 2.4)
 
-IF(NOT ParaView_BINARY_DIR)
+IF(NOT ParaViewExamples_BINARY_DIR)
   FIND_PACKAGE(ParaView REQUIRED)
   INCLUDE(${PARAVIEW_USE_FILE})
-ENDIF(NOT ParaView_BINARY_DIR)
+ENDIF (NOT ParaViewExamples_BINARY_DIR)
 
 IF(PARAVIEW_BUILD_QT_GUI)
   QT4_WRAP_CPP(MOC_SRCS ExampleDockPanel.h)
diff -urN ParaView-v4.1.0.old/Examples/Plugins/Filter/CMakeLists.txt ParaView-v4.1.0.new/Examples/Plugins/Filter/CMakeLists.txt
--- ParaView-v4.1.0.old/Examples/Plugins/Filter/CMakeLists.txt	2014-01-11 14:59:57.000000000 +0100
+++ ParaView-v4.1.0.new/Examples/Plugins/Filter/CMakeLists.txt	2014-03-09 00:29:34.000000000 +0100
@@ -1,9 +1,9 @@
 cmake_minimum_required(VERSION 2.8.8 FATAL_ERROR)
 
-if (NOT ParaView_BINARY_DIR)
+IF (NOT ParaViewExamples_BINARY_DIR)
   find_package(ParaView REQUIRED)
   include(${PARAVIEW_USE_FILE})
-endif()
+ENDIF (NOT ParaViewExamples_BINARY_DIR)
 
 include(ParaViewPlugins)
 
diff -urN ParaView-v4.1.0.old/Examples/Plugins/GUIObjectPanel/CMakeLists.txt ParaView-v4.1.0.new/Examples/Plugins/GUIObjectPanel/CMakeLists.txt
--- ParaView-v4.1.0.old/Examples/Plugins/GUIObjectPanel/CMakeLists.txt	2014-01-11 14:59:57.000000000 +0100
+++ ParaView-v4.1.0.new/Examples/Plugins/GUIObjectPanel/CMakeLists.txt	2014-03-09 00:29:34.000000000 +0100
@@ -3,10 +3,10 @@
 
 CMAKE_MINIMUM_REQUIRED(VERSION 2.4)
 
-IF(NOT ParaView_BINARY_DIR)
+IF(NOT ParaViewExamples_BINARY_DIR)
   FIND_PACKAGE(ParaView REQUIRED)
   INCLUDE(${PARAVIEW_USE_FILE})
-ENDIF(NOT ParaView_BINARY_DIR)
+ENDIF (NOT ParaViewExamples_BINARY_DIR)
 
 IF(PARAVIEW_BUILD_QT_GUI)
   QT4_WRAP_CPP(MOC_SRCS pqConePanel.h)
diff -urN ParaView-v4.1.0.old/Examples/Plugins/GUIToolBar/CMakeLists.txt ParaView-v4.1.0.new/Examples/Plugins/GUIToolBar/CMakeLists.txt
--- ParaView-v4.1.0.old/Examples/Plugins/GUIToolBar/CMakeLists.txt	2014-01-11 14:59:57.000000000 +0100
+++ ParaView-v4.1.0.new/Examples/Plugins/GUIToolBar/CMakeLists.txt	2014-03-09 00:29:34.000000000 +0100
@@ -3,10 +3,10 @@
 
 CMAKE_MINIMUM_REQUIRED(VERSION 2.4)
 
-IF(NOT ParaView_BINARY_DIR)
+IF(NOT ParaViewExamples_BINARY_DIR)
   FIND_PACKAGE(ParaView REQUIRED)
   INCLUDE(${PARAVIEW_USE_FILE})
-ENDIF(NOT ParaView_BINARY_DIR)
+ENDIF (NOT ParaViewExamples_BINARY_DIR)
 
 IF(PARAVIEW_BUILD_QT_GUI)
   QT4_WRAP_CPP(MOC_SRCS MyToolBarActions.h)
diff -urN ParaView-v4.1.0.old/Examples/Plugins/GUIView/CMakeLists.txt ParaView-v4.1.0.new/Examples/Plugins/GUIView/CMakeLists.txt
--- ParaView-v4.1.0.old/Examples/Plugins/GUIView/CMakeLists.txt	2014-01-11 14:59:57.000000000 +0100
+++ ParaView-v4.1.0.new/Examples/Plugins/GUIView/CMakeLists.txt	2014-03-09 00:29:34.000000000 +0100
@@ -4,10 +4,10 @@
 
 CMAKE_MINIMUM_REQUIRED(VERSION 2.4)
 
-IF(NOT ParaView_BINARY_DIR)
+IF(NOT ParaViewExamples_BINARY_DIR)
   FIND_PACKAGE(ParaView REQUIRED)
   INCLUDE(${PARAVIEW_USE_FILE})
-ENDIF(NOT ParaView_BINARY_DIR)
+ENDIF (NOT ParaViewExamples_BINARY_DIR)
 
 IF(PARAVIEW_BUILD_QT_GUI)
   # moc the Qt based .h files
diff -urN ParaView-v4.1.0.old/Examples/Plugins/HiddenLinesRemoval/CMakeLists.txt ParaView-v4.1.0.new/Examples/Plugins/HiddenLinesRemoval/CMakeLists.txt
--- ParaView-v4.1.0.old/Examples/Plugins/HiddenLinesRemoval/CMakeLists.txt	2014-01-11 14:59:57.000000000 +0100
+++ ParaView-v4.1.0.new/Examples/Plugins/HiddenLinesRemoval/CMakeLists.txt	2014-03-09 00:29:34.000000000 +0100
@@ -11,10 +11,10 @@
 
 cmake_minimum_required(VERSION 2.8.8 FATAL_ERROR)
 
-if (NOT ParaView_BINARY_DIR)
+IF (NOT ParaViewExamples_BINARY_DIR)
   find_package(ParaView REQUIRED)
   include(${PARAVIEW_USE_FILE})
-endif()
+ENDIF (NOT ParaViewExamples_BINARY_DIR)
 
 include(ParaViewPlugins)
 
diff -urN ParaView-v4.1.0.old/Examples/Plugins/ParametricSource/CMakeLists.txt ParaView-v4.1.0.new/Examples/Plugins/ParametricSource/CMakeLists.txt
--- ParaView-v4.1.0.old/Examples/Plugins/ParametricSource/CMakeLists.txt	2014-01-11 14:59:57.000000000 +0100
+++ ParaView-v4.1.0.new/Examples/Plugins/ParametricSource/CMakeLists.txt	2014-03-09 00:29:34.000000000 +0100
@@ -5,10 +5,10 @@
 
 CMAKE_MINIMUM_REQUIRED(VERSION 2.4)
 
-IF(NOT ParaView_BINARY_DIR)
+IF(NOT ParaViewExamples_BINARY_DIR)
   FIND_PACKAGE(ParaView REQUIRED)
   INCLUDE(${PARAVIEW_USE_FILE})
-ENDIF(NOT ParaView_BINARY_DIR)
+ENDIF (NOT ParaViewExamples_BINARY_DIR)
 
 ADD_PARAVIEW_PLUGIN(SMParametricSource "1.0"
   SERVER_MANAGER_XML ParametricSource.xml)
diff -urN ParaView-v4.1.0.old/Examples/Plugins/PropertyWidgets/CMakeLists.txt ParaView-v4.1.0.new/Examples/Plugins/PropertyWidgets/CMakeLists.txt
--- ParaView-v4.1.0.old/Examples/Plugins/PropertyWidgets/CMakeLists.txt	2014-01-11 14:59:57.000000000 +0100
+++ ParaView-v4.1.0.new/Examples/Plugins/PropertyWidgets/CMakeLists.txt	2014-03-09 00:29:34.000000000 +0100
@@ -2,10 +2,10 @@
 # pqPropertyWidgetDecorator instances for customizing the Properties panel.
 cmake_minimum_required(VERSION 2.8.8)
 
-if (NOT ParaView_BINARY_DIR)
+IF (NOT ParaViewExamples_BINARY_DIR)
   find_package(ParaView REQUIRED)
   include(${PARAVIEW_USE_FILE})
-endif()
+ENDIF (NOT ParaViewExamples_BINARY_DIR)
 
 
 if (PARAVIEW_BUILD_QT_GUI)
diff -urN ParaView-v4.1.0.old/Examples/Plugins/Reader/CMakeLists.txt ParaView-v4.1.0.new/Examples/Plugins/Reader/CMakeLists.txt
--- ParaView-v4.1.0.old/Examples/Plugins/Reader/CMakeLists.txt	2014-01-11 14:59:57.000000000 +0100
+++ ParaView-v4.1.0.new/Examples/Plugins/Reader/CMakeLists.txt	2014-03-09 00:29:34.000000000 +0100
@@ -4,10 +4,10 @@
 
 CMAKE_MINIMUM_REQUIRED(VERSION 2.4)
 
-IF(NOT ParaView_BINARY_DIR)
+IF(NOT ParaViewExamples_BINARY_DIR)
   FIND_PACKAGE(ParaView REQUIRED)
   INCLUDE(${PARAVIEW_USE_FILE})
-ENDIF(NOT ParaView_BINARY_DIR)
+ENDIF (NOT ParaViewExamples_BINARY_DIR)
 
 IF(PARAVIEW_BUILD_QT_GUI)
   # The pqReader.xml file contains xml defining readers with their file
diff -urN ParaView-v4.1.0.old/Examples/Plugins/ReaderXMLOnly/CMakeLists.txt ParaView-v4.1.0.new/Examples/Plugins/ReaderXMLOnly/CMakeLists.txt
--- ParaView-v4.1.0.old/Examples/Plugins/ReaderXMLOnly/CMakeLists.txt	2014-01-11 14:59:57.000000000 +0100
+++ ParaView-v4.1.0.new/Examples/Plugins/ReaderXMLOnly/CMakeLists.txt	2014-03-09 00:29:34.000000000 +0100
@@ -2,10 +2,10 @@
 # then the binary can be loaded in ParaView.
 cmake_minimum_required(VERSION 2.8)
 
-if (NOT ParaView_BINARY_DIR)
+IF (NOT ParaViewExamples_BINARY_DIR)
   find_package(ParaView REQUIRED)
   include(${PARAVIEW_USE_FILE})
-endif()
+ENDIF (NOT ParaViewExamples_BINARY_DIR)
 
 add_paraview_plugin(
   ReaderXMLOnly "1.0"
diff -urN ParaView-v4.1.0.old/Examples/Plugins/RenderPassViews/CMakeLists.txt ParaView-v4.1.0.new/Examples/Plugins/RenderPassViews/CMakeLists.txt
--- ParaView-v4.1.0.old/Examples/Plugins/RenderPassViews/CMakeLists.txt	2014-01-11 14:59:57.000000000 +0100
+++ ParaView-v4.1.0.new/Examples/Plugins/RenderPassViews/CMakeLists.txt	2014-03-09 00:29:34.000000000 +0100
@@ -4,15 +4,10 @@
 # 1> Render View with Shadow Maps and
 # 2> Render View with Edge detection
 
-IF (ParaView_SOURCE_DIR)
-  INCLUDE_DIRECTORIES(
-    ${VTK_INCLUDE_DIR}
-    ${PARAVIEW_INCLUDE_DIRS}
-  )
-ELSE (ParaView_SOURCE_DIR)
+IF (NOT ParaViewExamples_BINARY_DIR)
   FIND_PACKAGE(ParaView REQUIRED)
   INCLUDE(${PARAVIEW_USE_FILE})
-ENDIF (ParaView_SOURCE_DIR)
+ENDIF (NOT ParaViewExamples_BINARY_DIR)
 
 IF(PARAVIEW_BUILD_QT_GUI)
   QT4_WRAP_CPP(MOC_SRCS RegisterRenderPassViews.h)
diff -urN ParaView-v4.1.0.old/Examples/Plugins/Representation/CMakeLists.txt ParaView-v4.1.0.new/Examples/Plugins/Representation/CMakeLists.txt
--- ParaView-v4.1.0.old/Examples/Plugins/Representation/CMakeLists.txt	2014-01-11 14:59:57.000000000 +0100
+++ ParaView-v4.1.0.new/Examples/Plugins/Representation/CMakeLists.txt	2014-03-09 00:29:34.000000000 +0100
@@ -1,7 +1,7 @@
-IF (NOT ParaView_BINARY_DIR)
+IF (NOT ParaViewExamples_BINARY_DIR)
   FIND_PACKAGE(ParaView REQUIRED)
   INCLUDE(${PARAVIEW_USE_FILE})
-ENDIF (NOT ParaView_BINARY_DIR)
+ENDIF (NOT ParaViewExamples_BINARY_DIR)
 
 ADD_PARAVIEW_PLUGIN(Representation "1.0"
   SERVER_MANAGER_XML Representation.xml
diff -urN ParaView-v4.1.0.old/Examples/Plugins/RepresentationBehavior/CMakeLists.txt ParaView-v4.1.0.new/Examples/Plugins/RepresentationBehavior/CMakeLists.txt
--- ParaView-v4.1.0.old/Examples/Plugins/RepresentationBehavior/CMakeLists.txt	2014-01-11 14:59:57.000000000 +0100
+++ ParaView-v4.1.0.new/Examples/Plugins/RepresentationBehavior/CMakeLists.txt	2014-03-09 00:29:34.000000000 +0100
@@ -4,10 +4,10 @@
 
 CMAKE_MINIMUM_REQUIRED(VERSION 2.8)
 
-IF(NOT ParaView_BINARY_DIR)
+IF(NOT ParaViewExamples_BINARY_DIR)
   FIND_PACKAGE(ParaView REQUIRED)
   INCLUDE(${PARAVIEW_USE_FILE})
-ENDIF(NOT ParaView_BINARY_DIR)
+ENDIF (NOT ParaViewExamples_BINARY_DIR)
 
 QT4_WRAP_CPP(MOC_SRCS
   pqRepresentationBehaviorStarter.h
diff -urN ParaView-v4.1.0.old/Examples/Plugins/SMProxy/CMakeLists.txt ParaView-v4.1.0.new/Examples/Plugins/SMProxy/CMakeLists.txt
--- ParaView-v4.1.0.old/Examples/Plugins/SMProxy/CMakeLists.txt	2014-01-11 14:59:57.000000000 +0100
+++ ParaView-v4.1.0.new/Examples/Plugins/SMProxy/CMakeLists.txt	2014-03-09 00:29:34.000000000 +0100
@@ -8,10 +8,10 @@
 
 CMAKE_MINIMUM_REQUIRED(VERSION 2.4)
 
-IF(NOT ParaView_BINARY_DIR)
+IF(NOT ParaViewExamples_BINARY_DIR)
   FIND_PACKAGE(ParaView REQUIRED)
   INCLUDE(${PARAVIEW_USE_FILE})
-ENDIF(NOT ParaView_BINARY_DIR)
+ENDIF (NOT ParaViewExamples_BINARY_DIR)
 
 INCLUDE_DIRECTORIES(${CMAKE_CURRENT_BINARY_DIR})
 
diff -urN ParaView-v4.1.0.old/Examples/Plugins/SourceToolbar/CMakeLists.txt ParaView-v4.1.0.new/Examples/Plugins/SourceToolbar/CMakeLists.txt
--- ParaView-v4.1.0.old/Examples/Plugins/SourceToolbar/CMakeLists.txt	2014-01-11 14:59:57.000000000 +0100
+++ ParaView-v4.1.0.new/Examples/Plugins/SourceToolbar/CMakeLists.txt	2014-03-09 00:29:34.000000000 +0100
@@ -2,10 +2,10 @@
 
 CMAKE_MINIMUM_REQUIRED(VERSION 2.4)
 
-IF(NOT ParaView_BINARY_DIR)
+IF(NOT ParaViewExamples_BINARY_DIR)
   FIND_PACKAGE(ParaView REQUIRED)
   INCLUDE(${PARAVIEW_USE_FILE})
-ENDIF(NOT ParaView_BINARY_DIR)
+ENDIF (NOT ParaViewExamples_BINARY_DIR)
 
 IF(PARAVIEW_BUILD_QT_GUI)
   # We need to wrap for Qt stuff such as signals/slots etc. to work correctly.
diff -urN ParaView-v4.1.0.old/Examples/Plugins/VisItReader/CMakeLists.txt ParaView-v4.1.0.new/Examples/Plugins/VisItReader/CMakeLists.txt
--- ParaView-v4.1.0.old/Examples/Plugins/VisItReader/CMakeLists.txt	2014-01-11 14:59:57.000000000 +0100
+++ ParaView-v4.1.0.new/Examples/Plugins/VisItReader/CMakeLists.txt	2014-03-09 00:29:34.000000000 +0100
@@ -1,9 +1,9 @@
 cmake_minimum_required(VERSION 2.8.8 FATAL_ERROR)
 
-if (NOT ParaView_BINARY_DIR)
+IF (NOT ParaViewExamples_BINARY_DIR)
   find_package(ParaView REQUIRED)
   include(${PARAVIEW_USE_FILE})
-endif()
+ENDIF (NOT ParaViewExamples_BINARY_DIR)
 
 if (NOT TARGET vtkIOVisItBridge)
   message(FATAL_ERROR
diff -urN ParaView-v4.1.0.old/Examples/Plugins/Writer/CMakeLists.txt ParaView-v4.1.0.new/Examples/Plugins/Writer/CMakeLists.txt
--- ParaView-v4.1.0.old/Examples/Plugins/Writer/CMakeLists.txt	2014-01-11 14:59:57.000000000 +0100
+++ ParaView-v4.1.0.new/Examples/Plugins/Writer/CMakeLists.txt	2014-03-09 00:29:34.000000000 +0100
@@ -4,10 +4,10 @@
 
 CMAKE_MINIMUM_REQUIRED(VERSION 2.4)
 
-IF(NOT ParaView_BINARY_DIR)
+IF(NOT ParaViewExamples_BINARY_DIR)
   FIND_PACKAGE(ParaView REQUIRED)
   INCLUDE(${PARAVIEW_USE_FILE})
-ENDIF(NOT ParaView_BINARY_DIR)
+ENDIF (NOT ParaViewExamples_BINARY_DIR)
 
 ADD_PARAVIEW_PLUGIN(MyTiffWriter "1.0"
   SERVER_MANAGER_XML writers.xml
diff -urN ParaView-v4.1.0.old/ParaViewConfig.cmake.in ParaView-v4.1.0.new/ParaViewConfig.cmake.in
--- ParaView-v4.1.0.old/ParaViewConfig.cmake.in	2014-01-11 14:59:57.000000000 +0100
+++ ParaView-v4.1.0.new/ParaViewConfig.cmake.in	2014-03-09 00:29:34.000000000 +0100
@@ -12,9 +12,10 @@
   set (PARAVIEW_CONFIG_TARGETS_FILE "${location}/ParaViewTargets.cmake")
 else()
   # The ParaView is in the build-location.
-  set (VTK_CONFIG_FILE "@ParaView_BINARY_DIR@/VTK/VTKConfig.cmake")
+  set (VTK_CONFIG_FILE "@VTK_CONFIG_FILE@")
   set (ParaView_CMAKE_DIR "@ParaView_CMAKE_DIR@")
   set (PARAVIEW_CONFIG_TARGETS_FILE "@ParaView_BINARY_DIR@/ParaViewTargets.cmake")
+  set (PARAVIEW_MODULES_DIR "@PARAVIEW_MODULES_DIR@")
 endif()
 
 #------------------------------------------------------------------------------
@@ -45,6 +46,27 @@
   set (VTK_FIND_COMPONENTS vtkPVServerManagerApplication)
 endif()
 
+if (NOT __pv_install_tree)
+  # If we're building against an external VTK library than the modules are spread
+  # between the installation directory of VTK and in the directory where the just built 
+  # paraview modules are located. We need a 2-step hack to detect all the modules
+
+  message("calling CMakeLists.txt: ${CMAKE_PARENT_LIST_FILE}")
+
+  # 1) let's collect the just built paraview modules
+  file(GLOB config_files RELATIVE "${PARAVIEW_MODULES_DIR}" "${PARAVIEW_MODULES_DIR}/*.cmake")
+  foreach (_file ${config_files})
+    if (NOT "${_file}" MATCHES "[^\\-]+-[a-zA-Z]+\\.cmake")
+      string(REGEX REPLACE "\\.cmake$" "" _module "${_file}")
+      list(APPEND VTK_MODULES_ENABLED "${_module}")
+	  message(" - appeding ${_module}")
+    endif()
+  endforeach()
+
+  # 2) let's give vtk_module_load the possibility to find the paraview modules
+  set(CMAKE_MODULE_PATH ${CMAKE_MODULE_PATH} ${PARAVIEW_MODULES_DIR})
+endif()
+
 set (VTK_FIND_COMPONENTS ${VTK_FIND_COMPONENTS} ${ParaView_FIND_COMPONENTS})
 include("${VTK_CONFIG_FILE}")
 
diff -urN ParaView-v4.1.0.old/ThirdParty/QtTesting/vtkqttesting/CMakeLists.txt ParaView-v4.1.0.new/ThirdParty/QtTesting/vtkqttesting/CMakeLists.txt
--- ParaView-v4.1.0.old/ThirdParty/QtTesting/vtkqttesting/CMakeLists.txt	2014-01-11 15:00:10.000000000 +0100
+++ ParaView-v4.1.0.new/ThirdParty/QtTesting/vtkqttesting/CMakeLists.txt	2014-03-09 00:29:34.000000000 +0100
@@ -24,7 +24,7 @@
 ENDIF()
 
 IF(NOT DEFINED QtTesting_INSTALL_CMAKE_DIR)
-  SET(QtTesting_INSTALL_CMAKE_DIR lib/CMake)
+  SET(QtTesting_INSTALL_CMAKE_DIR ${VTK_INSTALL_PACKAGE_DIR})
 ENDIF()
 
 IF(NOT DEFINED QT_TESTING_EVENT_PLAYBACK_DELAY)
diff -urN ParaView-v4.1.0.old/Wrapping/Python/CMakeLists.txt ParaView-v4.1.0.new/Wrapping/Python/CMakeLists.txt
--- ParaView-v4.1.0.old/Wrapping/Python/CMakeLists.txt	2014-01-11 15:00:00.000000000 +0100
+++ ParaView-v4.1.0.new/Wrapping/Python/CMakeLists.txt	2014-03-09 00:29:34.000000000 +0100
@@ -39,7 +39,10 @@
 set(PV_PYTHON_MODULE_BINARY_DIR "${CMAKE_LIBRARY_OUTPUT_DIRECTORY}/site-packages/paraview")
 
 # Copy generated module files from VTK into place in the build tree
-set(_vtkpy_modules vtkpython_pyc)
+set(_vtkpy_modules)
+if( NOT ${PARAVIEW_USING_EXTERNAL_VTK} )
+  set(_vtkpy_modules vtkpython_pyc)
+endif( NOT ${PARAVIEW_USING_EXTERNAL_VTK} )
 if (TARGET vtkWebPython)
   list(APPEND _vtkpy_modules vtkWebPython)
 endif()
