CMake/Modules/FindVTK.cmake

76 lines
2.6 KiB
CMake
Raw Normal View History

#
# Find the native VTK includes and library
#
2001-09-19 22:52:59 +04:00
# This module defines
#
2001-09-21 01:31:38 +04:00
# VTK_INSTALL_PATH - where is the installed version of VTK
# VTK_BINARY_PATH - where is the binary tree (only defined if SOURCE_PATH is defined)
2001-09-19 22:52:59 +04:00
# USE_INSTALLED_VTK - sould an installed or source version of VTK be used
2001-09-21 19:48:36 +04:00
# USE_VTK_FILE - the full path and location of the UseVTK.cmake file
2001-09-19 22:52:59 +04:00
#
#
2001-09-21 01:31:38 +04:00
# Look for a binary tree
#
2001-09-21 19:48:36 +04:00
FIND_PATH(VTK_BINARY_PATH UseVTK.cmake
2001-09-25 22:39:51 +04:00
[HKEY_CURRENT_USER\\Software\\Kitware\\CMakeSetup\\Settings\\StartPath;WhereBuild1]
2001-09-19 22:52:59 +04:00
[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]
2001-09-25 22:39:51 +04:00
[HKEY_CURRENT_USER\\Software\\Kitware\\CMakeSetup\\Settings\\StartPath;WhereBuild5]
[HKEY_CURRENT_USER\\Software\\Kitware\\CMakeSetup\\Settings\\StartPath;WhereBuild6]
[HKEY_CURRENT_USER\\Software\\Kitware\\CMakeSetup\\Settings\\StartPath;WhereBuild7]
[HKEY_CURRENT_USER\\Software\\Kitware\\CMakeSetup\\Settings\\StartPath;WhereBuild8]
[HKEY_CURRENT_USER\\Software\\Kitware\\CMakeSetup\\Settings\\StartPath;WhereBuild9]
[HKEY_CURRENT_USER\\Software\\Kitware\\CMakeSetup\\Settings\\StartPath;WhereBuild10]
2001-09-19 22:52:59 +04:00
../VTKBIN
../vtkbin
VTKBIN
vtkbin
2001-09-20 17:11:21 +04:00
$ENV{HOME}/VTKBIN
$ENV{HOME}/vtkbin
2001-09-19 22:52:59 +04:00
)
2001-09-21 01:31:38 +04:00
#
# If we found a binary tree then set use_installed_vtk to 0
#
IF (VTK_BINARY_PATH)
SET (USE_INSTALLED_VTK 0 CACHE BOOL "Is an installed (versus source) version of VTK used")
ELSE (VTK_BINARY_PATH)
2001-09-21 19:48:36 +04:00
# look for installed path
FIND_PATH(VTK_INSTALL_PATH include/vtk/UseVTK.cmake
2001-09-19 22:52:59 +04:00
/usr/local
/usr
[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)
2001-09-21 01:31:38 +04:00
ENDIF (VTK_BINARY_PATH)
2001-09-19 22:52:59 +04:00
IF (USE_INSTALLED_VTK)
# look for the vtk header files in installed places
2001-09-21 19:48:36 +04:00
FIND_PATH(VTK_INSTALL_PATH include/vtk/UseVTK.cmake
2001-09-19 22:52:59 +04:00
/usr/local
/usr
[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)
2001-09-21 19:48:36 +04:00
IF (USE_INSTALLED_VTK)
IF (VTK_INSTALL_PATH)
SET (USE_VTK_FILE ${VTK_INSTALL_PATH}/include/vtk/UseVTK.cmake)
ENDIF (VTK_INSTALL_PATH)
ELSE (USE_INSTALLED_VTK)
IF (VTK_BINARY_PATH)
FIND_FILE(USE_VTK_FILE UseVTK.cmake ${VTK_BINARY_PATH})
2001-09-21 19:48:36 +04:00
ENDIF (VTK_BINARY_PATH)
ENDIF (USE_INSTALLED_VTK)