Commit 0ca2c22e authored by Brad King's avatar Brad King 💬
Browse files

ENH: Updates for taking advantage of CMake 1.6 to clean things up.

parent 67ceacf0
// Minimal test for existence of "bool" type.
void TestBool(bool) {}
int main()
{
TestBool(false);
TestBool(true);
return 0;
}
CMAKE_MINIMUM_REQUIRED(VERSION 1.4)
CMAKE_MINIMUM_REQUIRED(VERSION 1.6)
PROJECT(VTK)
INCLUDE_REGULAR_EXPRESSION("^(lex|vtk|png|j).*$")
......@@ -19,27 +19,9 @@ SET(VTK_LIBRARY_DIR ${LIBRARY_OUTPUT_PATH}/${CMAKE_CFG_INTDIR})
SET(VTK_EXECUTABLE_DIR ${EXECUTABLE_OUTPUT_PATH}/${CMAKE_CFG_INTDIR})
#-----------------------------------------------------------------------------
# Load the VTK CMake extension module.
IF(${CMAKE_MAJOR_VERSION}.${CMAKE_MINOR_VERSION} GREATER 1.4)
# test for some required system info
INCLUDE (${CMAKE_ROOT}/Modules/CMakeBackwardCompatibilityC.cmake)
INCLUDE (${CMAKE_ROOT}/Modules/CMakeBackwardCompatibilityCXX.cmake)
# Import the VTK_LOAD_CMAKE_EXTENSIONS macro.
INCLUDE(${VTK_SOURCE_DIR}/CMake/vtkLoadCMakeExtensions.cmake)
# Compile the extensions into the build tree and load them.
VTK_LOAD_CMAKE_EXTENSIONS(${VTK_SOURCE_DIR}/CMake ${VTK_BINARY_DIR}/CMake)
# Install cmake extension directory so user projects can build the commands.
INSTALL_FILES(/lib/vtk/CMake FILES
${VTK_SOURCE_DIR}/CMake/CMakeLists.txt
${VTK_SOURCE_DIR}/CMake/vtkLoadCMakeExtensions.cmake
${VTK_SOURCE_DIR}/CMake/cmVTKWrapTcl2Command.c
${VTK_SOURCE_DIR}/CMake/cmVTKWrapPython2Command.c
${VTK_SOURCE_DIR}/CMake/cmVTKWrapJava2Command.c
${VTK_SOURCE_DIR}/CMake/cmVTKMakeInstantiator2Command.c)
ENDIF(${CMAKE_MAJOR_VERSION}.${CMAKE_MINOR_VERSION} GREATER 1.4)
# Platform configuration tests.
INCLUDE (${CMAKE_ROOT}/Modules/CMakeBackwardCompatibilityC.cmake)
INCLUDE (${CMAKE_ROOT}/Modules/CMakeBackwardCompatibilityCXX.cmake)
SET(VTK_SIZEOF_CHAR ${CMAKE_SIZEOF_CHAR})
SET(VTK_SIZEOF_DOUBLE ${CMAKE_SIZEOF_DOUBLE})
......@@ -48,6 +30,42 @@ SET(VTK_SIZEOF_INT ${CMAKE_SIZEOF_INT})
SET(VTK_SIZEOF_LONG ${CMAKE_SIZEOF_LONG})
SET(VTK_SIZEOF_SHORT ${CMAKE_SIZEOF_SHORT})
IF("VTK_COMPILER_HAS_BOOL" MATCHES "^VTK_COMPILER_HAS_BOOL$")
MESSAGE(STATUS "Checking support for C++ type bool")
TRY_COMPILE(VTK_COMPILER_HAS_BOOL
${VTK_BINARY_DIR}
${VTK_SOURCE_DIR}/CMake/vtkTestBoolType.cxx
OUTPUT_VARIABLE OUTPUT)
IF(VTK_COMPILER_HAS_BOOL)
MESSAGE(STATUS "Checking support for C++ type bool -- yes")
SET(VTK_COMPILER_HAS_BOOL 1 CACHE INTERNAL "Support for C++ type bool")
ELSE(VTK_COMPILER_HAS_BOOL)
MESSAGE(STATUS "Checking support for C++ type bool -- no")
SET(VTK_COMPILER_HAS_BOOL 1 CACHE INTERNAL "Support for C++ type bool")
WRITE_FILE(${CMAKE_BINARY_DIR}/CMakeError.log
"Determining if the C++ compiler supports type bool "
"failed with the following output:\n"
"${OUTPUT}\n" APPEND)
ENDIF(VTK_COMPILER_HAS_BOOL)
ENDIF("VTK_COMPILER_HAS_BOOL" MATCHES "^VTK_COMPILER_HAS_BOOL$")
#-----------------------------------------------------------------------------
# Load the VTK CMake extension module.
# Import the VTK_LOAD_CMAKE_EXTENSIONS macro.
INCLUDE(${VTK_SOURCE_DIR}/CMake/vtkLoadCMakeExtensions.cmake)
# Compile the extensions into the build tree and load them.
VTK_LOAD_CMAKE_EXTENSIONS(${VTK_SOURCE_DIR}/CMake ${VTK_BINARY_DIR}/CMake)
# Install cmake extension directory so user projects can build the commands.
INSTALL_FILES(/lib/vtk/CMake FILES
${VTK_SOURCE_DIR}/CMake/CMakeLists.txt
${VTK_SOURCE_DIR}/CMake/vtkLoadCMakeExtensions.cmake
${VTK_SOURCE_DIR}/CMake/cmVTKWrapTcl2Command.c
${VTK_SOURCE_DIR}/CMake/cmVTKWrapPython2Command.c
${VTK_SOURCE_DIR}/CMake/cmVTKWrapJava2Command.c
${VTK_SOURCE_DIR}/CMake/cmVTKMakeInstantiator2Command.c)
#-----------------------------------------------------------------------------
# Determine the set of VTK kits that should be built.
......@@ -111,11 +129,9 @@ IF(APPLE)
IF (VTK_USE_CARBON)
SET(VTK_REQUIRED_CXX_FLAGS "${VTK_REQUIRED_CXX_FLAGS} -fpascal-strings")
ENDIF (VTK_USE_CARBON)
IF(${CMAKE_MAJOR_VERSION}.${CMAKE_MINOR_VERSION} GREATER 1.4)
IF(BUILD_SHARED_LIBS)
SET(VTK_APPLE_SHARED_FLAGS_NEEDED 1)
ENDIF(BUILD_SHARED_LIBS)
ENDIF(${CMAKE_MAJOR_VERSION}.${CMAKE_MINOR_VERSION} GREATER 1.4)
IF(BUILD_SHARED_LIBS)
SET(VTK_APPLE_SHARED_FLAGS_NEEDED 1)
ENDIF(BUILD_SHARED_LIBS)
ENDIF(APPLE)
IF(VTK_USE_X)
......@@ -588,21 +604,16 @@ LINK_DIRECTORIES(.)
# Help other projects use VTK.
# Save the compiler settings so another project can import them.
IF(${CMAKE_MAJOR_VERSION}.${CMAKE_MINOR_VERSION} GREATER 1.4)
INCLUDE(${CMAKE_ROOT}/Modules/CMakeExportBuildSettings.cmake)
CMAKE_EXPORT_BUILD_SETTINGS(${VTK_BINARY_DIR}/VTKBuildSettings.cmake)
INSTALL_FILES(/lib/vtk .cmake VTKBuildSettings)
ENDIF(${CMAKE_MAJOR_VERSION}.${CMAKE_MINOR_VERSION} GREATER 1.4)
INCLUDE(${CMAKE_ROOT}/Modules/CMakeExportBuildSettings.cmake)
CMAKE_EXPORT_BUILD_SETTINGS(${VTK_BINARY_DIR}/VTKBuildSettings.cmake)
INSTALL_FILES(/lib/vtk .cmake VTKBuildSettings)
# Create the VTKConfig.cmake file containing the VTK configuration.
INCLUDE (${VTK_SOURCE_DIR}/vtkGenerateVTKConfig.cmake)
# Install some files.
INSTALL_FILES(/include/vtk .h vtkConfigure vtkToolkits)
INSTALL_FILES(/lib/vtk .cmake UseVTK VTKLibraryDepends)
# Hack for cmake 1.4 module. It needs the file here.
INSTALL_FILES(/include/vtk .cmake UseVTK)
INSTALL_FILES(/lib/vtk .cmake UseVTK)
#-----------------------------------------------------------------------------
# Add compiler flags VTK needs to work on this platform. This must be
......
......@@ -267,11 +267,7 @@ ENDIF (VTK_WRAP_TCL)
#
IF (VTK_WRAP_PYTHON)
VTK_WRAP_PYTHON(vtkCommonPython CommonPython_SRCS ${Common_SRCS})
IF (APPLE)
ADD_LIBRARY(vtkCommonPython MODULE ${CommonPython_SRCS} vtkPythonUtil.cxx)
ELSE (APPLE)
ADD_LIBRARY(vtkCommonPython SHARED ${CommonPython_SRCS} vtkPythonUtil.cxx)
ENDIF(APPLE)
ADD_LIBRARY(vtkCommonPython MODULE ${CommonPython_SRCS} vtkPythonUtil.cxx)
IF(WIN32)
TARGET_LINK_LIBRARIES (vtkCommonPython
debug ${PYTHON_DEBUG_LIBRARY}
......@@ -325,16 +321,14 @@ INSTALL_FILES(/include/vtk .txx
vtkImageProgressIterator
)
IF(${CMAKE_MAJOR_VERSION}.${CMAKE_MINOR_VERSION} GREATER 1.4)
INSTALL_FILES(/lib/vtk/testing FILES
${VTK_SOURCE_DIR}/Common/Testing/HeaderTesting.py
${VTK_SOURCE_DIR}/Common/Testing/Tcl/FindString.tcl
${VTK_SOURCE_DIR}/Common/Testing/Tcl/PrintSelfCheck.tcl
${VTK_SOURCE_DIR}/Common/Testing/Tcl/rtImageTest.tcl)
INSTALL_FILES(/include/vtk FILES
${VTK_SOURCE_DIR}/Common/Testing/Cxx/vtkRegressionTestImage.h)
IF(VTK_USE_PARALLEL)
INSTALL_FILES(/lib/vtk/testing FILES
${VTK_SOURCE_DIR}/Common/Testing/HeaderTesting.py
${VTK_SOURCE_DIR}/Common/Testing/Tcl/FindString.tcl
${VTK_SOURCE_DIR}/Common/Testing/Tcl/PrintSelfCheck.tcl
${VTK_SOURCE_DIR}/Common/Testing/Tcl/rtImageTest.tcl)
INSTALL_FILES(/include/vtk FILES
${VTK_SOURCE_DIR}/Common/Testing/Cxx/vtkRegressionTestImage.h)
IF(VTK_USE_PARALLEL)
INSTALL_FILES(/lib/vtk/testing FILES
${VTK_SOURCE_DIR}/Common/Testing/Tcl/prtImageTest.tcl)
ENDIF(VTK_USE_PARALLEL)
ENDIF(${CMAKE_MAJOR_VERSION}.${CMAKE_MINOR_VERSION} GREATER 1.4)
${VTK_SOURCE_DIR}/Common/Testing/Tcl/prtImageTest.tcl)
ENDIF(VTK_USE_PARALLEL)
......@@ -116,11 +116,7 @@ IF(VTK_FOUND)
# Create Python wrappers if VTK is wrapped in Python.
IF(VTK_WRAP_PYTHON)
VTK_WRAP_PYTHON(${PROJECT_NAME}Python vtkLocalPYTHON_SRCS ${vtkLocal_SRCS})
IF(APPLE)
ADD_LIBRARY(${PROJECT_NAME}Python MODULE ${vtkLocalPYTHON_SRCS})
ELSE(APPLE)
ADD_LIBRARY(${PROJECT_NAME}Python SHARED ${vtkLocalPYTHON_SRCS})
ENDIF(APPLE)
ADD_LIBRARY(${PROJECT_NAME}Python MODULE ${vtkLocalPYTHON_SRCS})
TARGET_LINK_LIBRARIES(${PROJECT_NAME}Python vtkCommonPython ${PROJECT_NAME})
ENDIF(VTK_WRAP_PYTHON)
......
......@@ -25,11 +25,7 @@ ENDIF (VTK_WRAP_TCL AND VTKMY_WRAP_TCL)
# Create the vtkmyCommon Python library.
IF (VTK_WRAP_PYTHON AND VTKMY_WRAP_PYTHON)
VTK_WRAP_PYTHON (vtkmyCommonPython CommonPython_SRCS ${Common_SRCS})
IF (APPLE)
ADD_LIBRARY (vtkmyCommonPython MODULE ${CommonPython_SRCS})
ELSE (APPLE)
ADD_LIBRARY (vtkmyCommonPython SHARED ${CommonPython_SRCS})
ENDIF (APPLE)
ADD_LIBRARY (vtkmyCommonPython MODULE ${CommonPython_SRCS})
TARGET_LINK_LIBRARIES (vtkmyCommonPython vtkmyCommon vtkCommonPython)
ENDIF (VTK_WRAP_PYTHON AND VTKMY_WRAP_PYTHON)
......
......@@ -25,11 +25,7 @@ ENDIF (VTK_WRAP_TCL AND VTKMY_WRAP_TCL)
# Create the vtkmyImaging Python library.
IF (VTK_WRAP_PYTHON AND VTKMY_WRAP_PYTHON)
VTK_WRAP_PYTHON (vtkmyImagingPython ImagingPython_SRCS ${Imaging_SRCS})
IF (APPLE)
ADD_LIBRARY (vtkmyImagingPython MODULE ${ImagingPython_SRCS})
ELSE (APPLE)
ADD_LIBRARY (vtkmyImagingPython SHARED ${ImagingPython_SRCS})
ENDIF (APPLE)
ADD_LIBRARY (vtkmyImagingPython MODULE ${ImagingPython_SRCS})
TARGET_LINK_LIBRARIES (vtkmyImagingPython vtkmyCommonPython vtkmyImaging)
ENDIF (VTK_WRAP_PYTHON AND VTKMY_WRAP_PYTHON)
......
......@@ -41,11 +41,7 @@ ENDIF (VTK_WRAP_TCL AND VTKMY_WRAP_TCL)
# Create the vtkmyUnsorted Python library.
IF (VTK_WRAP_PYTHON AND VTKMY_WRAP_PYTHON)
VTK_WRAP_PYTHON (vtkmyUnsortedPython UnsortedPython_SRCS ${Unsorted_SRCS})
IF (APPLE)
ADD_LIBRARY (vtkmyUnsortedPython MODULE ${UnsortedPython_SRCS})
ELSE (APPLE)
ADD_LIBRARY (vtkmyUnsortedPython SHARED ${UnsortedPython_SRCS})
ENDIF (APPLE)
ADD_LIBRARY (vtkmyUnsortedPython MODULE ${UnsortedPython_SRCS})
TARGET_LINK_LIBRARIES(vtkmyUnsortedPython vtkmyCommonPython vtkmyUnsorted)
ENDIF (VTK_WRAP_PYTHON AND VTKMY_WRAP_PYTHON)
......
......@@ -139,12 +139,10 @@ ENDIF (VTK_WRAP_TCL)
#
IF (VTK_WRAP_PYTHON)
VTK_WRAP_PYTHON(vtkFilteringPython FilteringPython_SRCS ${Filtering_SRCS})
IF (APPLE)
ADD_LIBRARY(vtkFilteringPython MODULE ${FilteringPython_SRCS})
ELSE (APPLE)
ADD_LIBRARY(vtkFilteringPython SHARED ${FilteringPython_SRCS})
TARGET_LINK_LIBRARIES (vtkFilteringPython vtkCommonPython )
ENDIF (APPLE)
ADD_LIBRARY(vtkFilteringPython MODULE ${FilteringPython_SRCS})
IF(NOT APPLE)
TARGET_LINK_LIBRARIES (vtkFilteringPython vtkCommonPython)
ENDIF(NOT APPLE)
IF(WIN32)
TARGET_LINK_LIBRARIES (vtkFilteringPython
debug ${PYTHON_DEBUG_LIBRARY}
......
......@@ -205,12 +205,12 @@ ENDIF (VTK_WRAP_TCL)
#
IF (VTK_WRAP_PYTHON)
VTK_WRAP_PYTHON(vtkGraphicsPython GraphicsPython_SRCS ${Graphics_SRCS})
IF (APPLE)
ADD_LIBRARY(vtkGraphicsPython MODULE ${GraphicsPython_SRCS})
ELSE (APPLE)
ADD_LIBRARY(vtkGraphicsPython SHARED ${GraphicsPython_SRCS})
TARGET_LINK_LIBRARIES (vtkGraphicsPython vtkFilteringPython vtkCommonPython )
ENDIF (APPLE)
ADD_LIBRARY(vtkGraphicsPython MODULE ${GraphicsPython_SRCS})
IF(NOT APPLE)
TARGET_LINK_LIBRARIES (vtkGraphicsPython
vtkFilteringPython
vtkCommonPython)
ENDIF(NOT APPLE)
IF(WIN32)
TARGET_LINK_LIBRARIES (vtkGraphicsPython
debug ${PYTHON_DEBUG_LIBRARY}
......
......@@ -109,12 +109,10 @@ ENDIF (VTK_WRAP_TCL)
#
IF (VTK_WRAP_PYTHON)
VTK_WRAP_PYTHON(vtkHybridPython HybridPython_SRCS ${Hybrid_SRCS})
IF (APPLE)
ADD_LIBRARY(vtkHybridPython MODULE ${HybridPython_SRCS})
ELSE (APPLE)
ADD_LIBRARY(vtkHybridPython SHARED ${HybridPython_SRCS})
ADD_LIBRARY(vtkHybridPython MODULE ${HybridPython_SRCS})
IF(NOT APPLE)
TARGET_LINK_LIBRARIES (vtkHybridPython vtkRenderingPython vtkIOPython)
ENDIF (APPLE)
ENDIF(NOT APPLE)
TARGET_LINK_LIBRARIES (vtkHybridPython ${OPENGL_LIBRARY})
IF(WIN32)
TARGET_LINK_LIBRARIES (vtkHybridPython
......
......@@ -177,14 +177,12 @@ ENDIF (VTK_WRAP_TCL)
#
IF (VTK_WRAP_PYTHON)
VTK_WRAP_PYTHON(vtkIOPython IOPython_SRCS ${IO_SRCS})
IF (APPLE)
ADD_LIBRARY(vtkIOPython MODULE ${IOPython_SRCS})
ELSE (APPLE)
ADD_LIBRARY(vtkIOPython SHARED ${IOPython_SRCS})
ADD_LIBRARY(vtkIOPython MODULE ${IOPython_SRCS})
IF(NOT APPLE)
TARGET_LINK_LIBRARIES (vtkIOPython
vtkFilteringPython
vtkCommonPython)
ENDIF (APPLE)
ENDIF(NOT APPLE)
IF(WIN32)
TARGET_LINK_LIBRARIES (vtkIOPython
debug ${PYTHON_DEBUG_LIBRARY}
......
......@@ -159,15 +159,12 @@ ENDIF (VTK_WRAP_TCL)
#
IF (VTK_WRAP_PYTHON)
VTK_WRAP_PYTHON(vtkImagingPython ImagingPython_SRCS ${Imaging_SRCS})
IF (APPLE)
ADD_LIBRARY(vtkImagingPython MODULE ${ImagingPython_SRCS})
ELSE (APPLE)
ADD_LIBRARY(vtkImagingPython SHARED ${ImagingPython_SRCS})
ADD_LIBRARY(vtkImagingPython MODULE ${ImagingPython_SRCS})
IF(NOT APPLE)
TARGET_LINK_LIBRARIES (vtkImagingPython
vtkFilteringPython
vtkCommonPython)
ENDIF (APPLE)
ENDIF(NOT APPLE)
IF(WIN32)
TARGET_LINK_LIBRARIES (vtkImagingPython
debug ${PYTHON_DEBUG_LIBRARY}
......
......@@ -122,12 +122,10 @@ ENDIF (VTK_WRAP_TCL)
#
IF (VTK_WRAP_PYTHON)
VTK_WRAP_PYTHON(vtkParallelPython ParallelPython_SRCS ${Parallel_SRCS})
IF (APPLE)
ADD_LIBRARY(vtkParallelPython MODULE ${ParallelPython_SRCS})
ELSE (APPLE)
ADD_LIBRARY(vtkParallelPython SHARED ${ParallelPython_SRCS})
ADD_LIBRARY(vtkParallelPython MODULE ${ParallelPython_SRCS})
IF(NOT APPLE)
TARGET_LINK_LIBRARIES (vtkParallelPython vtkIOPython vtkRenderingPython)
ENDIF (APPLE)
ENDIF(NOT APPLE)
TARGET_LINK_LIBRARIES (vtkParallelPython ${OPENGL_LIBRARY})
IF(WIN32)
......
......@@ -55,14 +55,12 @@ ENDIF (VTK_WRAP_TCL)
#
IF (VTK_WRAP_PYTHON)
VTK_WRAP_PYTHON(vtkPatentedPython PatentedPython_SRCS ${Patented_SRCS})
IF (APPLE)
ADD_LIBRARY(vtkPatentedPython MODULE ${PatentedPython_SRCS})
ELSE (APPLE)
ADD_LIBRARY(vtkPatentedPython SHARED ${PatentedPython_SRCS})
ADD_LIBRARY(vtkPatentedPython MODULE ${PatentedPython_SRCS})
IF(NOT APPLE)
TARGET_LINK_LIBRARIES (vtkPatentedPython
vtkGraphicsPython
vtkImagingPython)
ENDIF (APPLE)
ENDIF(NOT APPLE)
IF(WIN32)
TARGET_LINK_LIBRARIES (vtkPatentedPython
debug ${PYTHON_DEBUG_LIBRARY}
......
......@@ -370,15 +370,12 @@ IF (VTK_WRAP_PYTHON)
RenderingPython_SRCS
${Rendering_SRCS}
${RenderingOpenGL_SRCS})
IF (APPLE)
ADD_LIBRARY(vtkRenderingPython MODULE ${RenderingPython_SRCS})
ELSE (APPLE)
ADD_LIBRARY(vtkRenderingPython SHARED ${RenderingPython_SRCS})
ADD_LIBRARY(vtkRenderingPython MODULE ${RenderingPython_SRCS})
IF(NOT APPLE)
TARGET_LINK_LIBRARIES (vtkRenderingPython
vtkGraphicsPython
vtkImagingPython)
ENDIF (APPLE)
ENDIF(NOT APPLE)
IF(WIN32)
TARGET_LINK_LIBRARIES (vtkRenderingPython
debug ${PYTHON_DEBUG_LIBRARY}
......
#
# This module add the VTK include paths to a project
# It should be included after the FindVTK module
# This module is provided as VTK_USE_FILE by VTKConfig.cmake. It can
# be INCLUDEd in a project to load the needed compiler and linker
# settings to use VTK.
#
# This file must support both the CMake 1.4 FindVTK.cmake module and
# the new VTK_DIR based find. If any of the old variables are set,
# the VTKConfig.cmake file has not yet been included. Otherwise, this
# file is being included from the VTK_USE_FILE setting provided in
# VTKConfig.cmake, so the settings have already been loaded.
# If VTK_USE_FILE is set, then VTKConfig.cmake has already been loaded.
IF(NOT VTK_USE_FILE)
# We are being included through USE_VTK_FILE. Load the settings.
IF(USE_INSTALLED_VTK)
INCLUDE(${VTK_INSTALL_PATH}/lib/vtk/VTKConfig.cmake)
ELSE(USE_INSTALLED_VTK)
IF(USE_BUILT_VTK)
INCLUDE(${VTK_BINARY_PATH}/VTKConfig.cmake)
ENDIF(USE_BUILT_VTK)
ENDIF(USE_INSTALLED_VTK)
ENDIF(NOT VTK_USE_FILE)
# Load the compiler settings used for VTK.
IF(${CMAKE_MAJOR_VERSION}.${CMAKE_MINOR_VERSION} GREATER 1.4)
IF(VTK_BUILD_SETTINGS_FILE)
INCLUDE(${CMAKE_ROOT}/Modules/CMakeImportBuildSettings.cmake)
CMAKE_IMPORT_BUILD_SETTINGS(${VTK_BUILD_SETTINGS_FILE})
ENDIF(VTK_BUILD_SETTINGS_FILE)
ELSE(${CMAKE_MAJOR_VERSION}.${CMAKE_MINOR_VERSION} GREATER 1.4)
# We have only CMake 1.4. Fall back to LOAD_CACHE to get the
# compiler settings.
SET(VTK_CACHE_DIR "")
IF(USE_INSTALLED_VTK)
SET(VTK_CACHE_DIR ${VTK_INSTALL_PATH}/include/vtk)
ELSE(USE_INSTALLED_VTK)
IF(USE_BUILT_VTK)
SET(VTK_CACHE_DIR ${VTK_BINARY_PATH})
ENDIF(USE_BUILT_VTK)
ENDIF(USE_INSTALLED_VTK)
IF(VTK_CACHE_DIR)
# Save the current compiler setting.
SET(VTK_PRE_LOAD_CACHE_CXX_COMPILER ${CMAKE_CXX_COMPILER})
# Load the cache, but exclude everything that is not a CMake build
# variable.
LOAD_CACHE(${VTK_CACHE_DIR} EXCLUDE
BUILDNAME
BUILD_DOCUMENTATION
BUILD_ERROR_REPORT_LIMIT
BUILD_EXAMPLES
BUILD_SHARED_LIBS
BUILD_TESTING
BUILD_WARNING_REPORT_LIMIT
COMPRESSIONCOMMAND
CVSCOMMAND
CVS_UPDATE_OPTIONS
DART_ROOT
DART_TESTING_TIMEOUT
DELIVER_CONTINUOUS_EMAIL
EXECUTABLE_OUTPUT_PATH
FTGL_BUILD_EXAMPLES
GUNZIPCOMMAND
JAVACOMMAND
JAVA_ARCHIVE
JAVA_AWT_INCLUDE_PATH
JAVA_AWT_LIBRARY
JAVA_COMPILE
JAVA_INCLUDE_PATH2
JAVA_INCLUDE_PATH
JAVA_RUNTIME
LIBRARY_OUTPUT_PATH
MAKECOMMAND
MPIRUN
MPI_EXTRA_LIBRARY
MPI_INCLUDE_PATH
MPI_LIBRARY
VTK_MPI_MAX_NUMPROCS
MPI_POSTFLAGS
MPI_PREFLAGS
OPENGL_INCLUDE_DIR
OPENGL_gl_LIBRARY
OPENGL_glu_LIBRARY
OPENGL_xmesa_INCLUDE_DIR
PURIFYCOMMAND
PYTHON_EXECUTABLE
PYTHON_INCLUDE_PATH
PYTHON_LIBRARY
SCPCOMMAND
SITE
TCL_INCLUDE_PATH
TCL_LIBRARY_DEBUG
TCL_STUB_LIBRARY
TCL_STUB_LIBRARY_DEBUG
TCL_TCLSH
TK_INCLUDE_PATH
TK_LIBRARY_DEBUG
TK_STUB_LIBRARY
TK_STUB_LIBRARY_DEBUG
TK_WISH
UTIL_LIBRARY
VERBOSE_BUILD
VTKEXPAT_BINARY_DIR
VTKEXPAT_SOURCE_DIR
VTKFREETYPE_BINARY_DIR
VTKFREETYPE_SOURCE_DIR
VTKFTGL_BINARY_DIR
VTKFTGL_SOURCE_DIR
VTKJPEG_BINARY_DIR
VTKJPEG_SOURCE_DIR
VTKPNG_BINARY_DIR
VTKPNG_SOURCE_DIR
VTKTIFF_BINARY_DIR
VTKTIFF_SOURCE_DIR
VTKZLIB_BINARY_DIR
VTKZLIB_SOURCE_DIR
VTK_BINARY_DIR
VTK_BUILD_PYTHON_EXECUTABLE
VTK_DATA_ROOT
VTK_DEBUG_LEAKS
VTK_DISABLE_TK_INIT
VTK_JAVA_HOME
VTK_MANGLE_MESA
VTK_MPIRUN_EXE
VTK_MPI_MAX_NUMPROCS
VTK_MPI_POSTFLAGS
VTK_MPI_PREFLAGS
VTK_OPENGL_HAS_OSMESA
VTK_PARSE_JAVA_EXE
VTK_USE_64BIT_IDS
VTK_USE_ANSI_STDLIB
VTK_USE_FREETYPE
VTK_USE_HYBRID
VTK_USE_MANGLED_MESA
VTK_USE_MPI
VTK_USE_PARALLEL
VTK_USE_PATENTED
VTK_USE_RENDERING
VTK_USE_VOLUMEPRO
VTK_USE_X
VTK_WRAP_HINTS
VTK_WRAP_JAVA
VTK_WRAP_JAVA_EXE
VTK_WRAP_PYTHON
VTK_WRAP_PYTHON_EXE
VTK_WRAP_TCL
VTK_WRAP_TCL_EXE
vtkCommonJava_LIB_DEPENDS
vtkCommonPython_LIB_DEPENDS
vtkCommonTCL_LIB_DEPENDS
vtkCommon_LIB_DEPENDS
vtkFilteringJava_LIB_DEPENDS
vtkFilteringPython_LIB_DEPENDS
vtkFilteringTCL_LIB_DEPENDS
vtkFiltering_LIB_DEPENDS
vtkGraphicsJava_LIB_DEPENDS
vtkGraphicsPython_LIB_DEPENDS
vtkGraphicsTCL_LIB_DEPENDS
vtkGraphics_LIB_DEPENDS
vtkHybridJava_LIB_DEPENDS
vtkHybridPython_LIB_DEPENDS
vtkHybridTCL_LIB_DEPENDS
vtkHybrid_LIB_DEPENDS
vtkIOJava_LIB_DEPENDS
vtkIOPython_LIB_DEPENDS
vtkIOTCL_LIB_DEPENDS
vtkIO_LIB_DEPENDS
vtkImagingJava_LIB_DEPENDS
vtkImagingPython_LIB_DEPENDS
vtkImagingTCL_LIB_DEPENDS
vtkImaging_LIB_DEPENDS
vtkParallelJava_LIB_DEPENDS
vtkParallelPython_LIB_DEPENDS
vtkParallelTCL_LIB_DEPENDS
vtkParallel_LIB_DEPENDS
vtkPatentedJava_LIB_DEPENDS
vtkPatentedPython_LIB_DEPENDS
vtkPatentedTCL_LIB_DEPENDS
vtkPatented_LIB_DEPENDS
vtkRenderingJava_LIB_DEPENDS
vtkRenderingPythonTkWidgets_LIB_DEPENDS
vtkRenderingPython_LIB_DEPENDS
vtkRenderingTCL_LIB_DEPENDS
vtkRendering_LIB_DEPENDS
vtkexpat_LIB_DEPENDS
vtkfreetype_LIB_DEPENDS
vtkftgl_LIB_DEPENDS
vtkjpeg_LIB_DEPENDS
vtkpng_LIB_DEPENDS
vtktiff_LIB_DEPENDS
vtkzlib_LIB_DEPENDS
)
# Check if the compiler changed and warn the user.
SET(VTK_CXX_COMPILER_CHANGED 0)
IF(VTK_PRE_LOAD_CACHE_CXX_COMPILER STRLESS CMAKE_CXX_COMPILER)
SET(VTK_CXX_COMPILER_CHANGED 1)
ENDIF(VTK_PRE_LOAD_CACHE_CXX_COMPILER STRLESS CMAKE_CXX_COMPILER)
IF(VTK_PRE_LOAD_CACHE_CXX_COMPILER STRGREATER CMAKE_CXX_COMPILER)
SET(VTK_CXX_COMPILER_CHANGED 1)
ENDIF(VTK_PRE_LOAD_CACHE_CXX_COMPILER STRGREATER CMAKE_CXX_COMPILER)
IF(VTK_CXX_COMPILER_CHANGED)
MESSAGE("Warning: CMake is forcing CMAKE_CXX_COMPILER to "
"\"${CMAKE_CXX_COMPILER}\" to match that imported from VTK. "
"This is required because C++ projects must use the same "
"compiler.")
ENDIF(VTK_CXX_COMPILER_CHANGED)
ENDIF(VTK_CACHE_DIR)
ENDIF(${CMAKE_MAJOR_VERSION}.${CMAKE_MINOR_VERSION} GREATER 1.4)
IF(VTK_BUILD_SETTINGS_FILE)
INCLUDE(${CMAKE_ROOT}/Modules/CMakeImportBuildSettings.cmake)
CMAKE_IMPORT_BUILD_SETTINGS(${VTK_BUILD_SETTINGS_FILE})
ENDIF(VTK_BUILD_SETTINGS_FILE)
# Add compiler flags needed to use VTK.
SET(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} ${VTK_REQUIRED_C_FLAGS}")
......
......@@ -81,8 +81,4 @@ SET(VTK_PRINT_SELF_CHECK_TCL "@VTK_PRINT_SELF_CHECK_TCL_CONFIG@")
SET(VTK_RT_IMAGE_TEST_TCL "@VTK_RT_IMAGE_TEST_TCL_CONFIG@")
SET(VTK_PRT_IMAGE_TEST_TCL "@VTK_PRT_IMAGE_TEST_TCL_CONFIG@")
# Load library dependencies used by CMake for automatic chainging of
# dependent libraries.
IF(EXISTS "@VTK_LIBRARY_DEPENDS_FILE@")
INCLUDE("@VTK_LIBRARY_DEPENDS_FILE@")
ENDIF(EXISTS "@VTK_LIBRARY_DEPENDS_FILE@")
# Library dependencies are appended below here.
# VTK Library Dependencies (for external projects)
SET(vtkCommon_LIB_DEPENDS "@vtkCommon_LIB_DEPENDS@")
SET(vtkCommonJava_LIB_DEPENDS "@vtkCommonJava_LIB_DEPENDS@")
SET(vtkCommonPython_LIB_DEPENDS "@vtkCommonPython_LIB_DEPENDS@")
SET(vtkCommonTCL_LIB_DEPENDS "@vtkCommonTCL_LIB_DEPENDS@")
SET(vtkFiltering_LIB_DEPENDS "@vtkFiltering_LIB_DEPENDS@")
SET(vtkFilteringJava_LIB_DEPENDS "@vtkFilteringJava_LIB_DEPENDS@")
SET(vtkFilteringPython_LIB_DEPENDS "@vtkFilteringPython_LIB_DEPENDS@")
SET(vtkFilteringTCL_LIB_DEPENDS "@vtkFilteringTCL_LIB_DEPENDS@")
SET(vtkGraphics_LIB_DEPENDS "@vtkGraphics_LIB_DEPENDS@")
SET(vtkGraphicsJava_LIB_DEPENDS "@vtkGraphicsJava_LIB_DEPENDS@")
SET(vtkGraphicsPython_LIB_DEPENDS "@vtkGraphicsPython_LIB_DEPENDS@")
SET(vtkGraphicsTCL_LIB_DEPENDS "@vtkGraphicsTCL_LIB_DEPENDS@")
SET(vtkHybrid_LIB_DEPENDS "@vtkHybrid_LIB_DEPENDS@")
SET(vtkHybridJava_LIB_DEPENDS "@vtkHybridJava_LIB_DEPENDS@")
SET(vtkHybridPython_LIB_DEPENDS "@vtkHybridPython_LIB_DEPENDS@")
SET(vtkHybridTCL_LIB_DEPENDS "@vtkHybridTCL_LIB_DEPENDS@")
SET(vtkIO_LIB_DEPENDS "@vtkIO_LIB_DEPENDS@")
SET(vtkIOJava_LIB_DEPENDS "@vtkIOJava_LIB_DEPENDS@")
SET(vtkIOPython_LIB_DEPENDS "@vtkIOPython_LIB_DEPENDS@")
SET(vtkIOTCL_LIB_DEPENDS "@vtkIOTCL_LIB_DEPENDS@")
SET(vtkImaging_LIB_DEPENDS "@vtkImaging_LIB_DEPENDS@")
SET(vtkImagingJava_LIB_DEPENDS "@vtkImagingJava_LIB_DEPENDS@")
SET(vtkImagingPython_LIB_DEPENDS "@vtkImagingPython_LIB_DEPENDS@")
SET(vtkImagingTCL_LIB_DEPENDS "@vtkImagingTCL_LIB_DEPENDS@")
SET(vtkParallel_LIB_DEPENDS "@vtkParallel_LIB_DEPENDS@")