summaryrefslogtreecommitdiffstats
path: root/Modules/FindVTK.cmake
diff options
context:
space:
mode:
authorKen Martin <ken.martin@kitware.com>2001-09-19 18:52:59 (GMT)
committerKen Martin <ken.martin@kitware.com>2001-09-19 18:52:59 (GMT)
commitee858f555cfdeb6573dcb42ca6c6e14387bb1887 (patch)
tree0c82c4cfee26282f7b80e51ade517464aec72da5 /Modules/FindVTK.cmake
parent1bf6afaabfd819678b5defc6059d214fee53aa9a (diff)
downloadCMake-ee858f555cfdeb6573dcb42ca6c6e14387bb1887.zip
CMake-ee858f555cfdeb6573dcb42ca6c6e14387bb1887.tar.gz
CMake-ee858f555cfdeb6573dcb42ca6c6e14387bb1887.tar.bz2
updated to how FindVTK works
Diffstat (limited to 'Modules/FindVTK.cmake')
-rw-r--r--Modules/FindVTK.cmake78
1 files changed, 69 insertions, 9 deletions
diff --git a/Modules/FindVTK.cmake b/Modules/FindVTK.cmake
index 56bdc91..a026f63 100644
--- a/Modules/FindVTK.cmake
+++ b/Modules/FindVTK.cmake
@@ -1,16 +1,76 @@
#
# Find the native VTK includes and library
#
+# This module defines
+#
+# VTK_INSTALL_PATH - where is the installed version of VTK
+# VTK_SOURCE_PATH - where is VTK source code
+# VTK_BIN_PATH - where is the binary tree (only defined if SOURCE_PATH is defined)
+# USE_INSTALLED_VTK - sould an installed or source version of VTK be used
+#
+
+
+#
+# Look for local source trees and builds of VTK
+#
+# look in the cmake list of recent source and bin dirs for this user
+#
+FIND_PATH(VTK_SOURCE_PATH Common/vtkObject.h
+ [HKEY_CURRENT_USER\\Software\\Kitware\\CMakeSetup\\Settings\\StartPath;WhereSource]
+ [HKEY_CURRENT_USER\\Software\\Kitware\\CMakeSetup\\Settings\\StartPath;WhereSource2]
+ [HKEY_CURRENT_USER\\Software\\Kitware\\CMakeSetup\\Settings\\StartPath;WhereSource3]
+ [HKEY_CURRENT_USER\\Software\\Kitware\\CMakeSetup\\Settings\\StartPath;WhereSource4]
+ ../VTK
+ VTK
+ )
+
+#
+# If we found a source tree then set use_installed_vtk to 0
+#
+IF (VTK_SOURCE_PATH)
+ SET (USE_INSTALLED_VTK 0 CACHE BOOL "Is an installed (versus source) version of VTK used")
+ #
+ # Look for a binary tree
+ #
+ FIND_PATH(VTK_BIN_PATH vtkConfigure.h
+ [HKEY_CURRENT_USER\\Software\\Kitware\\CMakeSetup\\Settings\\StartPath;WhereBuild]
+ [HKEY_CURRENT_USER\\Software\\Kitware\\CMakeSetup\\Settings\\StartPath;WhereBuild2]
+ [HKEY_CURRENT_USER\\Software\\Kitware\\CMakeSetup\\Settings\\StartPath;WhereBuild3]
+ [HKEY_CURRENT_USER\\Software\\Kitware\\CMakeSetup\\Settings\\StartPath;WhereBuild4]
+ ../VTKBIN
+ ../vtkbin
+ VTKBIN
+ vtkbin
+ )
+ELSE (VTK_SOURCE_PATH)
+ # look for the vtk header files in installed places
+ FIND_PATH(VTK_INSTALL_PATH include/vtk/vtkObject.h
+ /usr/local
+ /usr
+ )
+ FIND_PATH(VTK_INSTALL_PATH include/vtkObject.h
+ [HKEY_LOCAL_MACHINE\\SOFTWARE\\Kitware\\VTK\\Nightly]
+ )
+ IF (VTK_INSTALL_PATH)
+ SET (USE_INSTALLED_VTK 1 CACHE BOOL "Is an installed (versus source) version of VTK used")
+ ENDIF (VTK_INSTALL_PATH)
+ENDIF (VTK_SOURCE_PATH)
+
+IF (USE_INSTALLED_VTK)
+ # look for the vtk header files in installed places
+ FIND_PATH(VTK_INSTALL_PATH include/vtk/vtkObject.h
+ /usr/local
+ /usr
+ )
+ FIND_PATH(VTK_INSTALL_PATH include/vtkObject.h
+ [HKEY_LOCAL_MACHINE\\SOFTWARE\\Kitware\\VTK\\Nightly]
+ )
+ IF (VTK_INSTALL_PATH)
+ SET (USE_INSTALLED_VTK 1 CACHE BOOL "Is an installed (versus source) version of VTK used")
+ ENDIF (VTK_INSTALL_PATH)
+ENDIF (USE_INSTALLED_VTK)
+
-FIND_PATH(VTK_INCLUDE_PATH vtk.h
-/usr/local/include
-/usr/include
-/usr/local/vtk
-H:/usr/local/vtk
-)
-FIND_LIBRARY(VTK_LIB_PATH vtk.dll
-PATHS /usr/lib /usr/local/lib /usr/local/vtk/lib H:/usr/local/vtk/lib
-)