--- ThirdParty/QtTesting/CMakeLists.txt.orig
+++ ThirdParty/QtTesting/CMakeLists.txt
@@ -47,4 +47,6 @@
     ${CMAKE_CURRENT_BINARY_DIR}/vtkqttesting
   LIBRARIES QtTesting
 )
+if(NOT ${VTK_USE_SYSTEM_QTTESTING})
 vtk_target_export(QtTesting)
+endif()
--- ThirdParty/IceT/CMakeLists.txt.orig
+++ ThirdParty/IceT/CMakeLists.txt
@@ -68,12 +68,14 @@
   LIBRARIES IceTCore IceTMPI IceTGL
 )
 
+if(NOT ${VTK_USE_SYSTEM_ICET})
 # icet exports its build dir targets to a custom IceTTargets.cmake file. We
 # don't care much about it. We just ensure that we export the targets we are
 # interested in here again.
 vtk_target_export(IceTCore)
 vtk_target_export(IceTMPI)
 vtk_target_export(IceTGL)
+endif()
 
 # keep IceT variables from polluting the space.
 mark_as_advanced(