diff --git a/Code/Mantid/Build/CMake/CommonVatesSetup.cmake b/Code/Mantid/Build/CMake/CommonVatesSetup.cmake
new file mode 100644
index 0000000000000000000000000000000000000000..d89684bdae7a68168590fbeb63932f5d3c6ec3b9
--- /dev/null
+++ b/Code/Mantid/Build/CMake/CommonVatesSetup.cmake
@@ -0,0 +1,13 @@
+# Setup common things for the Vates subprojects
+
+include ( SetMantidSubprojects )
+
+set_mantid_subprojects (
+Framework/API
+Framework/Geometry
+Framework/Kernel
+Framework/MDAlgorithms
+Framework/MDDataObjects
+)
+
+set ( COMMONVATES_SETUP_DONE TRUE )
diff --git a/Code/Mantid/Build/CMake/SetMantidSubprojects.cmake b/Code/Mantid/Build/CMake/SetMantidSubprojects.cmake
new file mode 100644
index 0000000000000000000000000000000000000000..e23cab042dadffb01dba0b205f551c3c1fae046d
--- /dev/null
+++ b/Code/Mantid/Build/CMake/SetMantidSubprojects.cmake
@@ -0,0 +1,30 @@
+################################################################################
+#
+# Set information for given Mantid subprojects (can be more than one)
+# The form for each subproject should be:
+#
+#  subdirectory/subproject
+#
+# EX: Framework/Kernel
+#
+# Thie macro the calls include_directories for each path and creates the 
+# MANTID_SUBPROJECT_LIBS variable with the given subproject library names.
+#
+################################################################################
+macro ( set_mantid_subprojects )
+
+  if ( NOT MANTID_SUBPROJECT_LIBS )
+    set ( MANTID_SUBPROJECT_LIBS "" )
+  endif ( NOT MANTID_SUBPROJECT_LIBS )
+
+  foreach ( _subproject_path ${ARGN} )
+
+    string ( REGEX MATCH "/.+$" _subproject ${_subproject_path} )
+    string ( REGEX REPLACE "/" "" _subproject ${_subproject} )
+
+    include_directories ( "${CMAKE_SOURCE_DIR}/${_subproject_path}/inc" )
+    set ( MANTID_SUBPROJECT_LIBS "${_subproject}" ${MANTID_SUBPROJECT_LIBS} )
+
+  endforeach ( _subproject_path ${ARGN} )
+
+endmacro ( set_mantid_subprojects )
diff --git a/Code/Mantid/Vates/CMakeLists.txt b/Code/Mantid/Vates/CMakeLists.txt
index 53c28292dfe852c1c4055336ebbef4310e50203f..1c7776ab336dcc10bcd466b0153f13de4f1158eb 100644
--- a/Code/Mantid/Vates/CMakeLists.txt
+++ b/Code/Mantid/Vates/CMakeLists.txt
@@ -8,10 +8,14 @@ project ( Vates )
 find_package ( VisIt )
 
 if ( VISIT_FOUND )
-  include_directories ( VisitPresenters/inc )
+
+  # Perform common setup
+  include ( CommonVatesSetup )
+
   add_subdirectory ( VisitPresenters )
   add_subdirectory ( VisitPlugins )
   add_subdirectory ( VisitDataBases )
+
 else ( VISIT_FOUND )
   message ( STATUS "Vates-VisIt plugins and widgets will not be built." )
 endif ( VISIT_FOUND )
diff --git a/Code/Mantid/Vates/VisitDataBases/CMakeLists.txt b/Code/Mantid/Vates/VisitDataBases/CMakeLists.txt
index aa90bfac7e9febcfcf198724cd8c6447cd6bedad..dc6f4c67cef2c95519d39903e7a477f6e2d2baab 100644
--- a/Code/Mantid/Vates/VisitDataBases/CMakeLists.txt
+++ b/Code/Mantid/Vates/VisitDataBases/CMakeLists.txt
@@ -5,13 +5,7 @@ INCLUDE(${VISIT_INCLUDE_DIR}/VisItLibraryDependencies.cmake)
 
 PROJECT(MDFileReader)
 
-INCLUDE(GetMantidSubProject)
-get_mantid_subproject(Framework/API)
-get_mantid_subproject(Framework/Geometry)
-get_mantid_subproject(Framework/Kernel)
-get_mantid_subproject(Framework/MDAlgorithms)
-get_mantid_subproject(Framework/MDDataObjects)
-get_mantid_subproject(Vates/VisitPresenters)
+set_mantid_subprojects(Vates/VisitPresenters)
 
 SET(COMMON_SOURCES
 ${CMAKE_CURRENT_SOURCE_DIR}/src/MDFileReaderPluginInfo.C
@@ -57,31 +51,9 @@ ${VISIT_INCLUDE_DIR}/visit/avt/VisWindow/VisWindow
 ${VISIT_INCLUDE_DIR}/visit/visit_vtk/full
 ${VISIT_INCLUDE_DIR}/visit/visit_vtk/lightweight
 ${VTK_INCLUDE_DIRS}
-${MANTID_API_INCLUDE_DIR}
-${MANTID_GEOMETRY_INCLUDE_DIR}
-${MANTID_KERNEL_INCLUDE_DIR}
-${MANTID_MDDATAOBJECTS_INCLUDE_DIR}
-${MANTID_MDALGORITHMS_INCLUDE_DIR}
-${MANTID_VISITPRESENTERS_INCLUDE_DIR}
 ${CMAKE_CURRENT_SOURCE_DIR}/inc/VisitDataBases
 )
 
-# Handle Mantid subproject libraries
-set ( MANTID_SUBPROJECT_LIBS 
-Kernel
-Geometry
-API
-MDDataObjects
-MDAlgorithms
-VisitPresenters
-#${MANTID_KERNEL_LIBRARY} 
-#${MANTID_GEOMETRY_LIBRARY} 
-#${MANTID_API_LIBRARY} 
-#${MANTID_MDALGORITHMS_LIBRARY} 
-#${MANTID_MDDATAOBJECTS_LIBRARY}
-#${MANTID_VISITPRESENTERS_LIBRARY}
-)
-
 # TODO: Deal with this library better
 find_library(HDF5_LIBRARY
   NAMES hdf5
diff --git a/Code/Mantid/Vates/VisitPlugins/CMakeLists.txt b/Code/Mantid/Vates/VisitPlugins/CMakeLists.txt
index 247e47f9d146aa9219263fcbba5e8923fe2218a7..35afb73eb35a665a8df8ed03138aa4d5269d0673 100644
--- a/Code/Mantid/Vates/VisitPlugins/CMakeLists.txt
+++ b/Code/Mantid/Vates/VisitPlugins/CMakeLists.txt
@@ -5,13 +5,7 @@ INCLUDE(${VISIT_INCLUDE_DIR}/VisItLibraryDependencies.cmake)
 
 PROJECT(RebinningCutter)
 
-INCLUDE(GetMantidSubProject)
-get_mantid_subproject(Framework/API)
-get_mantid_subproject(Framework/Geometry)
-get_mantid_subproject(Framework/Kernel)
-get_mantid_subproject(Framework/MDAlgorithms)
-get_mantid_subproject(Framework/MDDataObjects)
-get_mantid_subproject(Vates/VisitPresenters)
+set_mantid_subprojects(Vates/VisitPresenters)
 
 SET(COMMON_SOURCES
 ${CMAKE_CURRENT_SOURCE_DIR}/src/RebinningCutterPluginInfo.C
@@ -97,12 +91,6 @@ ${QT_QTGUI_INCLUDE_DIR}
 ${VTK_INCLUDE_DIRS} 
 ${PYTHON_INCLUDE_PATH} 
 ${VISIT_INCLUDE_DIR}/visit/visitpy/visitpy 
-${MANTID_API_INCLUDE_DIR}
-${MANTID_GEOMETRY_INCLUDE_DIR}
-${MANTID_KERNEL_INCLUDE_DIR}
-${MANTID_MDDATAOBJECTS_INCLUDE_DIR}
-${MANTID_MDALGORITHMS_INCLUDE_DIR}
-${MANTID_VISITPRESENTERS_INCLUDE_DIR}
 ${CMAKE_CURRENT_SOURCE_DIR}/inc/VisitPlugins
 )
 
@@ -137,22 +125,6 @@ IF(NOT VISIT_SERVER_COMPONENTS_ONLY AND NOT VISIT_ENGINE_ONLY AND NOT VISIT_DBIO
     ENDIF(VISIT_JAVA)
 ENDIF(NOT VISIT_SERVER_COMPONENTS_ONLY AND NOT VISIT_ENGINE_ONLY AND NOT VISIT_DBIO_ONLY)
 
-# Handle Mantid subproject libraries
-set ( MANTID_SUBPROJECT_LIBS 
-Kernel
-Geometry
-API
-MDDataObjects
-MDAlgorithms
-VisitPresenters
-#${MANTID_KERNEL_LIBRARY} 
-#${MANTID_GEOMETRY_LIBRARY} 
-#${MANTID_API_LIBRARY} 
-#${MANTID_MDALGORITHMS_LIBRARY} 
-#${MANTID_MDDATAOBJECTS_LIBRARY}
-#${MANTID_VISITPRESENTERS_LIBRARY}
-)
-
 # TODO: Deal with this library better
 find_library(HDF5_LIBRARY
   NAMES hdf5
diff --git a/Code/Mantid/Vates/VisitPresenters/CMakeLists.txt b/Code/Mantid/Vates/VisitPresenters/CMakeLists.txt
index 55dea14b08ad764871c5a729d92966158aea8def..f09a557c0e8ab2a8a73ed9c110a0ab107be270d1 100644
--- a/Code/Mantid/Vates/VisitPresenters/CMakeLists.txt
+++ b/Code/Mantid/Vates/VisitPresenters/CMakeLists.txt
@@ -1,3 +1,6 @@
+# This is mainly here so you don't get a complaint when running cmake
+cmake_minimum_required ( VERSION 2.6 )
+
 project ( VisitPresenters )
 
 set ( SRC_FILES 
@@ -29,41 +32,9 @@ set_target_properties ( VisitPresenters PROPERTIES OUTPUT_NAME MantidVisitPresen
 # Add to the 'Framework' group in VS
 set_property ( TARGET VisitPresenters PROPERTY FOLDER "Framework" )
 
-INCLUDE(GetMantidSubProject)
-get_mantid_subproject(Framework/API)
-get_mantid_subproject(Framework/Geometry)
-get_mantid_subproject(Framework/Kernel)
-get_mantid_subproject(Framework/MDAlgorithms)
-get_mantid_subproject(Framework/MDDataObjects)
-
-include_directories (
-${MANTID_API_INCLUDE_DIR}
-${MANTID_GEOMETRY_INCLUDE_DIR}
-${MANTID_KERNEL_INCLUDE_DIR}
-${MANTID_MDALGORITHMS_INCLUDE_DIR}
-# TODO: MDDataObjects headers need to conform to Mantid naming convention
-# So we can't use get_mantid_subproject stuff
-${CMAKE_CURRENT_SOURCE_DIR}/../../Framework/MDDataObjects/inc 
-)
 include_directories (${VISIT_INCLUDE_DIR}/vtk/include/vtk-5.0)
 include_directories (inc)
 
-message(STATUS "P: ${MANTIDLIBS}")
-
-# Handle Mantid subproject libraries
-set ( MANTID_SUBPROJECT_LIBS 
-Kernel
-Geometry
-API
-MDDataObjects
-MDAlgorithms
-#${MANTID_KERNEL_LIBRARY} 
-#${MANTID_GEOMETRY_LIBRARY} 
-#${MANTID_API_LIBRARY} 
-#${MANTID_MDALGORITHMS_LIBRARY} 
-#${MANTID_MDDATAOBJECTS_LIBRARY}
-)
-
 target_link_libraries (VisitPresenters ${MANTID_SUBPROJECT_LIBS} ${VISIT_ROOT}/lib/libvtkCommon${CMAKE_SHARED_LIBRARY_SUFFIX} ${VISIT_ROOT}/lib/libvtkFiltering${CMAKE_SHARED_LIBRARY_SUFFIX}) #TODO: Not the correct way to access shared libraries
 # Create test file projects
 if ( CXXTEST_FOUND )