Commit 9e9c0118 authored by Andy Cedilnik's avatar Andy Cedilnik
Browse files

COMP: INSTALL MADNESScvs diff Use new install commands with components

parent 9737e747
......@@ -37,17 +37,22 @@ ENDIF (VTK_WRAP_JAVA)
TARGET_LINK_LIBRARIES(vtk${KIT} ${KIT_LIBS})
IF(NOT VTK_INSTALL_NO_LIBRARIES)
IF(VTK_INSTALL_HAS_CMAKE_24)
INSTALL(TARGETS vtk${KIT}
RUNTIME DESTINATION ${VTK_INSTALL_BIN_DIR_CM24} COMPONENT Runtime
LIBRARY DESTINATION ${VTK_INSTALL_LIB_DIR_CM24} COMPONENT Runtime
ARCHIVE DESTINATION ${VTK_INSTALL_LIB_DIR_CM24} COMPONENT Development)
ELSE(VTK_INSTALL_HAS_CMAKE_24)
INSTALL_TARGETS(${VTK_INSTALL_LIB_DIR} vtk${KIT})
ENDIF(VTK_INSTALL_HAS_CMAKE_24)
INSTALL(TARGETS vtk${KIT}
RUNTIME DESTINATION ${VTK_INSTALL_BIN_DIR_CM24} COMPONENT RuntimeLibraries
LIBRARY DESTINATION ${VTK_INSTALL_LIB_DIR_CM24} COMPONENT RuntimeLibraries
ARCHIVE DESTINATION ${VTK_INSTALL_LIB_DIR_CM24} COMPONENT Development)
ENDIF(NOT VTK_INSTALL_NO_LIBRARIES)
IF(NOT VTK_INSTALL_NO_DEVELOPMENT)
INSTALL_FILES(${VTK_INSTALL_INCLUDE_DIR} .h ${Kit_SRCS})
SET(__files.h)
FOREACH(__file ${Kit_SRCS})
GET_FILENAME_COMPONENT(__fname ${__file} ABSOLUTE)
GET_FILENAME_COMPONENT(__fname.path ${__fname} PATH)
GET_FILENAME_COMPONENT(__fname.name ${__fname} NAME_WE)
SET(__files.h ${__files.h} "${__fname.path}/${__fname.name}.h")
ENDFOREACH(__file)
INSTALL(FILES ${__files.h}
DESTINATION ${VTK_INSTALL_INCLUDE_DIR_CM24}
COMPONENT Development)
ENDIF(NOT VTK_INSTALL_NO_DEVELOPMENT)
VTK_EXPORT_KIT("${KIT}" "${UKIT}" "${Kit_SRCS}")
......
VTK_WRAP_JAVA3(vtk${KIT}Java KitJava_SRCS "${Kit_SRCS}")
ADD_LIBRARY(vtk${KIT}Java SHARED ${KitJava_SRCS} ${Kit_JAVA_EXTRA_SRCS})
SET(KIT_LIBRARY_TARGETS ${KIT_LIBRARY_TARGETS} vtk${KIT}Java)
TARGET_LINK_LIBRARIES(vtk${KIT}Java vtk${KIT} ${KIT_JAVA_LIBS})
IF(NOT VTK_INSTALL_NO_LIBRARIES)
INSTALL_TARGETS(${VTK_INSTALL_LIB_DIR} vtk${KIT}Java)
ENDIF(NOT VTK_INSTALL_NO_LIBRARIES)
IF(KIT_JAVA_DEPS)
ADD_DEPENDENCIES(vtk${KIT}Java ${KIT_JAVA_DEPS})
ENDIF(KIT_JAVA_DEPS)
VTK_WRAP_JAVA3(vtk${KIT}Java KitJava_SRCS "${Kit_SRCS}")
ADD_LIBRARY(vtk${KIT}Java SHARED ${KitJava_SRCS} ${Kit_JAVA_EXTRA_SRCS})
SET(KIT_LIBRARY_TARGETS ${KIT_LIBRARY_TARGETS} vtk${KIT}Java)
TARGET_LINK_LIBRARIES(vtk${KIT}Java vtk${KIT} ${KIT_JAVA_LIBS})
IF(NOT VTK_INSTALL_NO_LIBRARIES)
INSTALL(TARGETS vtk${KIT}Java
RUNTIME DESTINATION ${VTK_INSTALL_BIN_DIR_CM24} COMPONENT RuntimeLibraries
LIBRARY DESTINATION ${VTK_INSTALL_LIB_DIR_CM24} COMPONENT RuntimeLibraries
ARCHIVE DESTINATION ${VTK_INSTALL_LIB_DIR_CM24} COMPONENT Development)
ENDIF(NOT VTK_INSTALL_NO_LIBRARIES)
IF(KIT_JAVA_DEPS)
ADD_DEPENDENCIES(vtk${KIT}Java ${KIT_JAVA_DEPS})
ENDIF(KIT_JAVA_DEPS)
......@@ -7,7 +7,10 @@ VTK_WRAP_PYTHON3(vtk${KIT}Python KitPython_SRCS "${Kit_SRCS}")
ADD_LIBRARY(vtk${KIT}PythonD ${KitPython_SRCS} ${Kit_PYTHON_EXTRA_SRCS})
TARGET_LINK_LIBRARIES(vtk${KIT}PythonD vtk${KIT} ${KIT_PYTHON_LIBS})
IF(NOT VTK_INSTALL_NO_LIBRARIES)
INSTALL_TARGETS(${VTK_INSTALL_LIB_DIR} RUNTIME_DIRECTORY ${VTK_INSTALL_BIN_DIR} vtk${KIT}PythonD)
INSTALL(TARGETS vtk${KIT}PythonD
RUNTIME DESTINATION ${VTK_INSTALL_BIN_DIR_CM24} COMPONENT RuntimeLibraries
LIBRARY DESTINATION ${VTK_INSTALL_LIB_DIR_CM24} COMPONENT RuntimeLibraries
ARCHIVE DESTINATION ${VTK_INSTALL_LIB_DIR_CM24} COMPONENT Development)
ENDIF(NOT VTK_INSTALL_NO_LIBRARIES)
SET(KIT_LIBRARY_TARGETS ${KIT_LIBRARY_TARGETS} vtk${KIT}PythonD)
......
......@@ -5,7 +5,10 @@ ADD_LIBRARY(vtk${KIT}TCL ${KitTCL_SRCS} ${Kit_TCL_EXTRA_SRCS})
SET(KIT_LIBRARY_TARGETS ${KIT_LIBRARY_TARGETS} vtk${KIT}TCL)
TARGET_LINK_LIBRARIES (vtk${KIT}TCL vtk${KIT} ${KIT_TCL_LIBS})
IF(NOT VTK_INSTALL_NO_LIBRARIES)
INSTALL_TARGETS(${VTK_INSTALL_LIB_DIR} vtk${KIT}TCL)
INSTALL(TARGETS vtk${KIT}TCL
RUNTIME DESTINATION ${VTK_INSTALL_BIN_DIR_CM24} COMPONENT RuntimeLibraries
LIBRARY DESTINATION ${VTK_INSTALL_LIB_DIR_CM24} COMPONENT RuntimeLibraries
ARCHIVE DESTINATION ${VTK_INSTALL_LIB_DIR_CM24} COMPONENT Development)
ENDIF(NOT VTK_INSTALL_NO_LIBRARIES)
IF(KIT_TCL_DEPS)
ADD_DEPENDENCIES(vtk${KIT}TCL ${KIT_TCL_DEPS})
......
......@@ -11,42 +11,7 @@ TRY_RUN(SHARED_LIBRARY_PATH_TYPE SHARED_LIBRARY_PATH_INFO_COMPILED
OUTPUT_VARIABLE OUTPUT
ARGS "LDPATH")
# for CMAKE 2.2 and later, get path from vtkSharedLibraryPathInfo's stdout
IF("${CMAKE_MAJOR_VERSION}.${CMAKE_MINOR_VERSION}" GREATER 2.0)
STRING(REGEX MATCH "([a-zA-Z][a-zA-Z0-9_]*)(\r|\n)*$" OUTPUT "${OUTPUT}")
STRING(REGEX MATCH "[a-zA-Z][a-zA-Z0-9_]*" OUTPUT "${OUTPUT}")
SET(SHARED_LIBRARY_PATH_VAR_NAME "${OUTPUT}")
ELSE("${CMAKE_MAJOR_VERSION}.${CMAKE_MINOR_VERSION}" GREATER 2.0)
# this code is to support CMake 2.0 and earlier
SET(SHARED_LIBRARY_PATH_VAR_NAME "LD_LIBRARY_PATH")
IF (CMAKE_SYSTEM_NAME MATCHES "Darwin")
SET(SHARED_LIBRARY_PATH_VAR_NAME "DYLD_LIBRARY_PATH")
ENDIF (CMAKE_SYSTEM_NAME MATCHES "Darwin")
IF (CMAKE_SYSTEM_NAME MATCHES "SunOS.*")
IF (SHARED_LIBRARY_PATH_TYPE EQUAL 64)
SET(SHARED_LIBRARY_PATH_VAR_NAME "LD_LIBRARY_PATH_64")
ENDIF (SHARED_LIBRARY_PATH_TYPE EQUAL 64)
ENDIF (CMAKE_SYSTEM_NAME MATCHES "SunOS.*")
IF (CMAKE_SYSTEM_NAME MATCHES "IRIX.*")
IF (SHARED_LIBRARY_PATH_TYPE EQUAL 32)
SET(SHARED_LIBRARY_PATH_VAR_NAME "LD_LIBRARYN32_PATH")
ENDIF (SHARED_LIBRARY_PATH_TYPE EQUAL 32)
IF (SHARED_LIBRARY_PATH_TYPE EQUAL 64)
SET(SHARED_LIBRARY_PATH_VAR_NAME "LD_LIBRARY64_PATH")
ENDIF (SHARED_LIBRARY_PATH_TYPE EQUAL 64)
ENDIF (CMAKE_SYSTEM_NAME MATCHES "IRIX.*")
IF (CMAKE_SYSTEM_NAME MATCHES "AIX")
SET(SHARED_LIBRARY_PATH_VAR_NAME "LIBPATH")
ENDIF (CMAKE_SYSTEM_NAME MATCHES "AIX")
IF (CMAKE_SYSTEM_NAME MATCHES "HP-UX")
IF (SHARED_LIBRARY_PATH_TYPE LESS 64)
SET(SHARED_LIBRARY_PATH_VAR_NAME "SHLIB_PATH")
ENDIF (SHARED_LIBRARY_PATH_TYPE LESS 64)
ENDIF (CMAKE_SYSTEM_NAME MATCHES "HP-UX")
IF (WIN32)
SET(SHARED_LIBRARY_PATH_VAR_NAME "PATH")
ENDIF (WIN32)
ENDIF("${CMAKE_MAJOR_VERSION}.${CMAKE_MINOR_VERSION}" GREATER 2.0)
SET(SHARED_LIBRARY_PATH_VAR_NAME ${SHARED_LIBRARY_PATH_VAR_NAME} CACHE INTERNAL "runtime library path variable name.")
STRING(REGEX MATCH "([a-zA-Z][a-zA-Z0-9_]*)(\r|\n)*$" OUTPUT "${OUTPUT}")
STRING(REGEX MATCH "[a-zA-Z][a-zA-Z0-9_]*" OUTPUT "${OUTPUT}")
SET(SHARED_LIBRARY_PATH_VAR_NAME "${OUTPUT}" CACHE INTERNAL "runtime library path variable name.")
......@@ -29,8 +29,9 @@ MACRO(VTK_EXPORT_KIT kit ukit sources)
${VTK_BINARY_DIR}/Utilities/vtk${kit}Kit.cmake
@ONLY IMMEDIATE)
IF(NOT VTK_INSTALL_NO_DEVELOPMENT)
INSTALL_FILES(${VTK_INSTALL_PACKAGE_DIR} FILES
INSTALL(FILES
${VTK_BINARY_DIR}/Utilities/InstallOnly/vtk${kit}Kit.cmake
)
DESTINATION "${VTK_INSTALL_PACKAGE_DIR_CM24}"
COMPONENT Development)
ENDIF(NOT VTK_INSTALL_NO_DEVELOPMENT)
ENDMACRO(VTK_EXPORT_KIT)
......@@ -49,20 +49,6 @@ IF(NOT VTK_SHARED_LIBRARIES_SELECTED)
IF(VTK_USE_RPATH)
# We will use rpath support. Tell CMake not to skip it.
SET(CMAKE_SKIP_RPATH 0 CACHE INTERNAL "Whether to build with rpath." FORCE)
# Disable installation for CMake earlier than 2.4.
IF(NOT VTK_INSTALL_HAS_CMAKE_24)
# If someone is trying to install do not do an entire build with
# the wrong rpath feature setting just to report failed
# installation.
SET(CMAKE_SKIP_INSTALL_ALL_DEPENDENCY 1)
# Add a dummy target and attach an install rule that will always fail
# and produce a message explaining why installation is disabled.
ADD_CUSTOM_TARGET(vtk_install_disabled)
SET_TARGET_PROPERTIES(vtk_install_disabled PROPERTIES
PRE_INSTALL_SCRIPT ${VTK_CMAKE_DIR}/InstallDisabled.cmake)
ENDIF(NOT VTK_INSTALL_HAS_CMAKE_24)
ELSE(VTK_USE_RPATH)
# We will not use rpath support. Tell CMake to skip it.
SET(CMAKE_SKIP_RPATH 1 CACHE INTERNAL "Whether to build with rpath." FORCE)
......
......@@ -113,7 +113,7 @@ ENDMACRO (VTK_GET_TK_SUPPORT_FILES)
# copy (or install) the appropriate support files to destination dirs,
# recreating the subdirs.
# This macro takes an optional last parameter, if set to INSTALL the
# files will be scheduled for installation (using CMake's INSTALL_FILES)
# files will be scheduled for installation (using CMake's INSTALL)
# instead of copied.
#
# in: tcl_support_lib_dir: path to the Tcl support lib dir
......@@ -139,12 +139,16 @@ MACRO (VTK_COPY_TCL_TK_SUPPORT_FILES tcl_support_lib_dir tcl_support_lib_dest tk
# exist, it would create the subdirs anyway)
VTK_GET_TCL_SUPPORT_FILES(${tcl_support_lib_dir} "TCL_SUPPORT_FILES")
STRING(REGEX REPLACE "^/" "" tcl_support_lib_dest_cm24 "${tcl_support_lib_dest}")
STRING(REGEX REPLACE "^/" "" tk_support_lib_dest_cm24 "${tk_support_lib_dest}")
FOREACH (file ${TCL_SUPPORT_FILES})
IF (EXISTS ${file})
STRING (REGEX REPLACE "${tcl_support_lib_dir}/" "" filebase ${file})
IF ("${ARGV4}" STREQUAL "INSTALL")
GET_FILENAME_COMPONENT(dir ${filebase} PATH)
INSTALL_FILES ("${tcl_support_lib_dest}/${dir}" FILES ${file})
INSTALL(FILES "${file}"
DESTINATION "${tcl_support_lib_dest_cm24}/${dir}"
COMPONENT RuntimeLibraries)
ELSE ("${ARGV4}" STREQUAL "INSTALL")
CONFIGURE_FILE (${file} "${tcl_support_lib_dest}/${filebase}" COPYONLY)
ENDIF ("${ARGV4}" STREQUAL "INSTALL")
......@@ -157,7 +161,9 @@ MACRO (VTK_COPY_TCL_TK_SUPPORT_FILES tcl_support_lib_dir tcl_support_lib_dest tk
STRING (REGEX REPLACE "${tk_support_lib_dir}/" "" filebase ${file})
IF ("${ARGV4}" STREQUAL "INSTALL")
GET_FILENAME_COMPONENT(dir ${filebase} PATH)
INSTALL_FILES ("${tk_support_lib_dest}/${dir}" FILES ${file})
INSTALL(FILES "${file}"
DESTINATION "${tk_support_lib_dest_cm24}/${dir}"
COMPONENT RuntimeLibraries)
ELSE ("${ARGV4}" STREQUAL "INSTALL")
CONFIGURE_FILE (${file} "${tk_support_lib_dest}/${filebase}" COPYONLY)
ENDIF ("${ARGV4}" STREQUAL "INSTALL")
......@@ -173,7 +179,7 @@ ENDMACRO (VTK_COPY_TCL_TK_SUPPORT_FILES)
# The Tcl/Tk version is retrieved automatically and used to create
# the subdirectories (see example below)
# This macro takes an optional last parameter, if set to INSTALL the
# files will be scheduled for installation (using CMake's INSTALL_FILES)
# files will be scheduled for installation (using CMake's INSTALL)
# instead of copied.
#
# in: tcl_support_lib_dir: path to the Tcl support lib dir
......
CMAKE_MINIMUM_REQUIRED(VERSION 2.4)
PROJECT(VTK)
MACRO(INSTALL_TARGETS)
MESSAGE(FATAL_ERROR "Somebody is calling old INSTALL_TARGETS command with arguments: ${ARGV}")
ENDMACRO(INSTALL_TARGETS)
MACRO(INSTALL_PROGRAMS)
MESSAGE(FATAL_ERROR "Somebody is calling old INSTALL_PROGRAMS command with arguments: ${ARGV}")
ENDMACRO(INSTALL_PROGRAMS)
MACRO(INSTALL_FILES)
MESSAGE(FATAL_ERROR "Somebody is calling old INSTALL_FILES command with arguments: ${ARGV}")
ENDMACRO(INSTALL_FILES)
# We will require CMake 2.4 as of August 15th 2006
IF("${CMAKE_MAJOR_VERSION}.${CMAKE_MINOR_VERSION}" LESS 2.4)
MESSAGE(FATAL_ERROR "VTK requires CMake 2.4 as of August 15th 2006. Please update your CMake and this message will go away.")
ENDIF("${CMAKE_MAJOR_VERSION}.${CMAKE_MINOR_VERSION}" LESS 2.4)
IF("${CMAKE_MAJOR_VERSION}.${CMAKE_MINOR_VERSION}" GREATER 2.3)
SET(VTK_INSTALL_HAS_CMAKE_24 1)
ENDIF("${CMAKE_MAJOR_VERSION}.${CMAKE_MINOR_VERSION}" GREATER 2.3)
# Don't build anything unless the version of CMake is high enough.
# The matching ELSE/ENDIF should be the last lines in the file.
IF("${CMAKE_MAJOR_VERSION}.${CMAKE_MINOR_VERSION}" GREATER 1.9)
SET(VTK_CMAKE_DIR "${VTK_SOURCE_DIR}/CMake")
SET(CMAKE_MODULE_PATH ${CMAKE_MODULE_PATH} "${VTK_CMAKE_DIR}")
......@@ -87,17 +91,6 @@ FILE(READ "${VTK_CMAKE_DIR}/vtkRequireLargeFilesSupport.cxx"
CHECK_CXX_SOURCE_RUNS("${VTK_REQUIRE_LARGE_FILE_SUPPORT_FILE}"
VTK_REQUIRE_LARGE_FILE_SUPPORT "Support for 64 bit file systems")
#-----------------------------------------------------------------------------
# Disable the install targets if using the rpath feature with CMake
# earlier than 2.4.
IF(NOT WIN32)
IF(VTK_USE_RPATH AND NOT VTK_INSTALL_HAS_CMAKE_24)
SET(VTK_INSTALL_NO_RUNTIME 1)
SET(VTK_INSTALL_NO_DEVELOPMENT 1)
SET(VTK_INSTALL_NO_DOCUMENTATION 1)
ENDIF(VTK_USE_RPATH AND NOT VTK_INSTALL_HAS_CMAKE_24)
ENDIF(NOT WIN32)
#-----------------------------------------------------------------------------
# Discover the name of the runtime library path environment variable
# and put the result in SHARED_LIBRARY_PATH_VAR_NAME.
......@@ -214,17 +207,21 @@ ENDIF(BUILD_SHARED_LIBS)
# and newer) requires no leading / to install under INSTALL_PREFIX, we
# are stripping the leading /. In the future, there should be no leading
# / in any install directory variables
IF(VTK_INSTALL_HAS_CMAKE_24)
STRING(REGEX REPLACE "^/" "" VTK_INSTALL_LIB_DIR_CM24 "${VTK_INSTALL_LIB_DIR}")
STRING(REGEX REPLACE "^/" "" VTK_INSTALL_BIN_DIR_CM24 "${VTK_INSTALL_BIN_DIR}")
STRING(REGEX REPLACE "^/" "" VTK_INSTALL_INCLUDE_DIR_CM24 "${VTK_INSTALL_INCLUDE_DIR}")
ENDIF(VTK_INSTALL_HAS_CMAKE_24)
STRING(REGEX REPLACE "^/" "" VTK_INSTALL_LIB_DIR_CM24 "${VTK_INSTALL_LIB_DIR}")
STRING(REGEX REPLACE "^/" "" VTK_INSTALL_BIN_DIR_CM24 "${VTK_INSTALL_BIN_DIR}")
STRING(REGEX REPLACE "^/" "" VTK_INSTALL_INCLUDE_DIR_CM24 "${VTK_INSTALL_INCLUDE_DIR}")
STRING(REGEX REPLACE "^/" "" VTK_INSTALL_PACKAGE_DIR_CM24 "${VTK_INSTALL_PACKAGE_DIR}")
STRING(REGEX REPLACE "^/" "" VTK_INSTALL_DOXYGEN_DIR_CM24 "${VTK_INSTALL_DOXYGEN_DIR}")
STRING(REGEX REPLACE "^/" "" VTK_INSTALL_TCL_DIR_CM24 "${VTK_INSTALL_TCL_DIR}")
STRING(REGEX REPLACE "^/" "" VTK_INSTALL_JAVA_DIR_CM24 "${VTK_INSTALL_JAVA_DIR}")
#-----------------------------------------------------------------------------
# Save the compiler settings so another project can import them.
CMAKE_EXPORT_BUILD_SETTINGS(${VTK_BINARY_DIR}/VTKBuildSettings.cmake)
IF(NOT VTK_INSTALL_NO_DEVELOPMENT)
INSTALL_FILES(${VTK_INSTALL_PACKAGE_DIR} .cmake VTKBuildSettings)
INSTALL(FILES "${VTK_BINARY_DIR}/VTKBuildSettings.cmake"
DESTINATION ${VTK_INSTALL_PACKAGE_DIR_CM24}
COMPONENT Development)
ENDIF(NOT VTK_INSTALL_NO_DEVELOPMENT)
#-----------------------------------------------------------------------------
......@@ -899,13 +896,11 @@ IF(NOT VTK_USE_ANSI_STDLIB)
ENDIF(NOT VTK_USE_ANSI_STDLIB)
IF(NOT VTK_INSTALL_NO_LIBRARIES)
SET(KWSYS_LIBRARY_INSTALL_DIR ${VTK_INSTALL_LIB_DIR})
IF(VTK_INSTALL_HAS_CMAKE_24)
SET(KWSYS_INSTALL_BIN_DIR ${VTK_INSTALL_BIN_DIR_CM24})
SET(KWSYS_INSTALL_LIB_DIR ${VTK_INSTALL_LIB_DIR_CM24})
SET(KWSYS_INSTALL_INCLUDE_DIR ${VTK_INSTALL_INCLUDE_DIR_CM24})
SET(KWSYS_INSTALL_COMPONENT_NAME_RUNTIME Runtime)
SET(KWSYS_INSTALL_COMPONENT_NAME_DEVELOPMENT Development)
ENDIF(VTK_INSTALL_HAS_CMAKE_24)
SET(KWSYS_INSTALL_BIN_DIR ${VTK_INSTALL_BIN_DIR_CM24})
SET(KWSYS_INSTALL_LIB_DIR ${VTK_INSTALL_LIB_DIR_CM24})
SET(KWSYS_INSTALL_INCLUDE_DIR ${VTK_INSTALL_INCLUDE_DIR_CM24})
SET(KWSYS_INSTALL_COMPONENT_NAME_RUNTIME RuntimeLibraries)
SET(KWSYS_INSTALL_COMPONENT_NAME_DEVELOPMENT Development)
ENDIF(NOT VTK_INSTALL_NO_LIBRARIES)
IF(NOT VTK_INSTALL_NO_DEVELOPMENT)
SET(KWSYS_HEADER_INSTALL_DIR ${VTK_INSTALL_INCLUDE_DIR})
......@@ -980,25 +975,7 @@ ENDIF(BUILD_TESTING)
# the VTK build. Doing so will not work because they are designed to
# be built out-of-tree.
IF(BUILD_EXAMPLES)
SET(VTK_CMAKE_VERSION_FOR_EXAMPLES)
# The examples tree now requires CMake 2.0.4 or higher.
IF("${CMAKE_MAJOR_VERSION}.${CMAKE_MINOR_VERSION}" MATCHES "^2.0$")
# Have version 2.0. Check for the Modules/CMakeTestForFreeVC.cxx
# file which was added in 2.0.4 (this is a nasty hack).
IF(EXISTS ${CMAKE_ROOT}/Modules/CMakeTestForFreeVC.cxx)
SET(VTK_CMAKE_VERSION_FOR_EXAMPLES 1)
ENDIF(EXISTS ${CMAKE_ROOT}/Modules/CMakeTestForFreeVC.cxx)
ELSE("${CMAKE_MAJOR_VERSION}.${CMAKE_MINOR_VERSION}" MATCHES "^2.0$")
# Have version 2.1 or higher.
SET(VTK_CMAKE_VERSION_FOR_EXAMPLES 1)
ENDIF("${CMAKE_MAJOR_VERSION}.${CMAKE_MINOR_VERSION}" MATCHES "^2.0$")
IF(VTK_CMAKE_VERSION_FOR_EXAMPLES)
SUBDIRS(Examples)
ELSE(VTK_CMAKE_VERSION_FOR_EXAMPLES)
MESSAGE(
"Warning: The BUILD_EXAMPLES option now requires CMake 2.0.4 or higher "
"and is being ignored.")
ENDIF(VTK_CMAKE_VERSION_FOR_EXAMPLES)
SUBDIRS(Examples)
ENDIF(BUILD_EXAMPLES)
#-----------------------------------------------------------------------------
......@@ -1161,8 +1138,9 @@ FOREACH(header algorithm deque iterator list map new numeric queue set stack str
CONFIGURE_FILE(${VTK_SOURCE_DIR}/Utilities/vtkstd.h.in
${VTK_BINARY_DIR}/vtkstd/${header} @ONLY IMMEDIATE)
IF(NOT VTK_INSTALL_NO_DEVELOPMENT)
INSTALL_FILES(${VTK_INSTALL_INCLUDE_DIR}/vtkstd
FILES ${VTK_BINARY_DIR}/vtkstd/${header})
INSTALL(FILES ${VTK_BINARY_DIR}/vtkstd/${header}
DESTINATION ${VTK_INSTALL_INCLUDE_DIR_CM24}/vtkstd
COMPONENT Development)
ENDIF(NOT VTK_INSTALL_NO_DEVELOPMENT)
ENDFOREACH(header)
......@@ -1235,13 +1213,15 @@ IF(VTK_WRAP_TCL)
ENDIF(VTK_WRAP_TCL)
IF(NOT VTK_INSTALL_NO_DEVELOPMENT)
INSTALL_FILES(${VTK_INSTALL_PACKAGE_DIR}/CMake FILES
INSTALL(FILES
${VTK_CMAKE_DIR}/vtkTclTkMacros.cmake
${VTK_CMAKE_DIR}/vtkWrapTcl.cmake
${VTK_CMAKE_DIR}/vtkWrapJava.cmake
${VTK_CMAKE_DIR}/vtkWrapPython.cmake
${VTK_CMAKE_DIR}/vtkWrapperInit.data.in
${VTK_CMAKE_DIR}/VTKVersionMacros.cmake
DESTINATION ${VTK_INSTALL_PACKAGE_DIR_CM24}/CMake
COMPONENT Development
)
ENDIF(NOT VTK_INSTALL_NO_DEVELOPMENT)
......@@ -1440,25 +1420,30 @@ INCLUDE_DIRECTORIES(
IF(NOT VTK_INSTALL_NO_DEVELOPMENT)
# Install the instantiator headers.
INSTALL_FILES(${VTK_INSTALL_INCLUDE_DIR} .h vtkCommonInstantiator
vtkFilteringInstantiator vtkIOInstantiator
vtkImagingInstantiator vtkGraphicsInstantiator
vtkGenericFilteringInstantiator)
SET(__inst_files
${VTK_BINARY_DIR}/vtkCommonInstantiator.h
${VTK_BINARY_DIR}/vtkFilteringInstantiator.h
${VTK_BINARY_DIR}/vtkIOInstantiator.h
${VTK_BINARY_DIR}/vtkImagingInstantiator.h
${VTK_BINARY_DIR}/vtkGraphicsInstantiator.h
${VTK_BINARY_DIR}/vtkGenericFilteringInstantiator.h
${VTK_CMAKE_DIR}/vtkMakeInstantiator.cmake
${VTK_CMAKE_DIR}/vtkMakeInstantiator.h.in
${VTK_CMAKE_DIR}/vtkMakeInstantiator.cxx.in)
IF(VTK_USE_RENDERING)
INSTALL_FILES(${VTK_INSTALL_INCLUDE_DIR} .h vtkRenderingInstantiator)
INSTALL_FILES(${VTK_INSTALL_INCLUDE_DIR} .h vtkVolumeRenderingInstantiator)
INSTALL_FILES(${VTK_INSTALL_INCLUDE_DIR} .h vtkHybridInstantiator)
INSTALL_FILES(${VTK_INSTALL_INCLUDE_DIR} .h vtkWidgetsInstantiator)
SET(__inst_files ${__inst_files} ${VTK_BINARY_DIR}/vtkRenderingInstantiator.h)
SET(__inst_files ${__inst_files} ${VTK_BINARY_DIR}/vtkVolumeRenderingInstantiator.h)
SET(__inst_files ${__inst_files} ${VTK_BINARY_DIR}/vtkHybridInstantiator.h)
SET(__inst_files ${__inst_files} ${VTK_BINARY_DIR}/vtkWidgetsInstantiator.h)
ENDIF(VTK_USE_RENDERING)
IF(VTK_USE_PARALLEL)
INSTALL_FILES(${VTK_INSTALL_INCLUDE_DIR} .h vtkParallelInstantiator)
SET(__inst_files ${__inst_files} ${VTK_BINARY_DIR}/vtkParallelInstantiator.h)
ENDIF(VTK_USE_PARALLEL)
# Install cmake extensions so user projects can load them.
INSTALL_FILES(${VTK_INSTALL_PACKAGE_DIR}/CMake FILES
${VTK_CMAKE_DIR}/vtkMakeInstantiator.cmake
${VTK_CMAKE_DIR}/vtkMakeInstantiator.h.in
${VTK_CMAKE_DIR}/vtkMakeInstantiator.cxx.in)
INSTALL(FILES ${__inst_files}
DESTINATION ${VTK_INSTALL_INCLUDE_DIR_CM24}
COMPONENT Development)
ENDIF(NOT VTK_INSTALL_NO_DEVELOPMENT)
# Save library dependencies.
......@@ -1466,11 +1451,17 @@ EXPORT_LIBRARY_DEPENDENCIES(${VTK_BINARY_DIR}/VTKLibraryDepends.cmake)
# Install some files.
IF(NOT VTK_INSTALL_NO_DEVELOPMENT)
INSTALL_FILES(${VTK_INSTALL_INCLUDE_DIR} .h vtkConfigure vtkToolkits)
INSTALL_FILES(${VTK_INSTALL_PACKAGE_DIR} .cmake UseVTK VTKLibraryDepends)
SET(__inst_files
${VTK_BINARY_DIR}/vtkConfigure.h
${VTK_BINARY_DIR}/vtkToolkits.h
${VTK_BINARY_DIR}/UseVTK.cmake
${VTK_BINARY_DIR}/VTKLibraryDepends.cmake)
IF(VTK_WRAP_HINTS)
INSTALL_FILES(${VTK_INSTALL_PACKAGE_DIR} FILES ${VTK_WRAP_HINTS})
SET(__inst_files ${__inst_files} ${VTK_WRAP_HINTS})
ENDIF(VTK_WRAP_HINTS)
INSTALL(FILES ${__inst_files}
DESTINATION ${VTK_INSTALL_INCLUDE_DIR_CM24}
COMPONENT Development)
ENDIF(NOT VTK_INSTALL_NO_DEVELOPMENT)
#-----------------------------------------------------------------------------
......@@ -1523,11 +1514,3 @@ INCLUDE(${VTK_SOURCE_DIR}/LocalUserOptions.cmake OPTIONAL)
# the end of the whole configuration process, as a "last step".
# This directory is typically the last SUBDIRS in the main CMakeLists.txt.
SUBDIRS(Utilities/LastConfigureStep)
# If the version of CMake was too old, complain and build nothing.
# These should be the last lines in this file.
ELSE("${CMAKE_MAJOR_VERSION}.${CMAKE_MINOR_VERSION}" GREATER 1.9)
MESSAGE(SEND_ERROR
"This version of CMake is too old to build VTK. "
"Please upgrade to CMake 2.0 or later.")
ENDIF("${CMAKE_MAJOR_VERSION}.${CMAKE_MINOR_VERSION}" GREATER 1.9)
......@@ -300,57 +300,59 @@ IF(CMAKE_COMPILER_IS_GNUCXX AND MINGW)
ENDIF(CMAKE_COMPILER_IS_GNUCXX AND MINGW)
IF(NOT VTK_INSTALL_NO_DEVELOPMENT)
INSTALL_FILES(${VTK_INSTALL_INCLUDE_DIR} .h
vtkArrayIteratorTemplate
vtkDataArrayTemplate
vtkIOStream
vtkIOStreamFwd
vtkSetGet
vtkSmartPointer
vtkSystemIncludes
vtkType
vtkTypeTraits
vtkWin32Header
vtkWindows
SET(__inst_files
vtkArrayIteratorTemplate.h
vtkDataArrayTemplate.h
vtkIOStream.h
vtkIOStreamFwd.h
vtkSetGet.h
vtkSmartPointer.h
vtkSystemIncludes.h
vtkType.h
vtkTypeTraits.h
vtkWin32Header.h
vtkWindows.h
)
IF(VTK_WRAP_TCL)
INSTALL_FILES(${VTK_INSTALL_INCLUDE_DIR} .h
vtkTcl
vtkTclUtil
vtkTk
SET(__inst_files ${__inst_files}
vtkTcl.h
vtkTclUtil.h
vtkTk.h
)
ENDIF(VTK_WRAP_TCL)
IF(VTK_WRAP_PYTHON)
INSTALL_FILES(${VTK_INSTALL_INCLUDE_DIR} .h
vtkPythonUtil
)
INSTALL_FILES(${VTK_INSTALL_INCLUDE_DIR} FILES
SET(__inst_files ${__inst_files}
vtkPythonUtil.h
vtkPython.h
)
IF (TK_LIBRARY)
IF(NOT VTK_USE_COCOA)
INSTALL_FILES(${VTK_INSTALL_INCLUDE_DIR} .h
vtkTcl
vtkTk
SET(__inst_files ${__inst_files}
vtkTcl.h
vtkTk.h
)
ENDIF(NOT VTK_USE_COCOA)
ENDIF (TK_LIBRARY)
ENDIF(VTK_WRAP_PYTHON)
IF(VTK_WRAP_JAVA)
INSTALL_FILES(${VTK_INSTALL_INCLUDE_DIR} .h
vtkJavaUtil
SET(__inst_files ${__inst_files}
vtkJavaUtil.h
)
ENDIF(VTK_WRAP_JAVA)
INSTALL_FILES(${VTK_INSTALL_INCLUDE_DIR} .txx
vtkArrayIteratorTemplate
vtkArrayIteratorTemplateImplicit
vtkDataArrayTemplate
vtkDataArrayTemplateImplicit
)
SET(__inst_files ${__inst_files}
vtkArrayIteratorTemplate.txx
vtkArrayIteratorTemplateImplicit.txx
vtkDataArrayTemplate.txx
vtkDataArrayTemplateImplicit.txx
${VTK_SOURCE_DIR}/${KIT}/Testing/Cxx/vtkTestUtilities.h)
INSTALL_FILES(${VTK_INSTALL_PACKAGE_DIR}/testing FILES
INSTALL(FILES ${__inst_files}
DESTINATION ${VTK_INSTALL_INCLUDE_DIR_CM24}
COMPONENT Development)
SET(__inst_files
${VTK_SOURCE_DIR}/${KIT}/Testing/HeaderTesting.py
${VTK_SOURCE_DIR}/${KIT}/Testing/WindowsMangleList.py
${VTK_SOURCE_DIR}/${KIT}/Testing/Tcl/FindString.tcl
......@@ -358,10 +360,12 @@ IF(NOT VTK_INSTALL_NO_DEVELOPMENT)
${VTK_SOURCE_DIR}/${KIT}/Testing/Tcl/rtImageTest.tcl
${VTK_SOURCE_DIR}/${KIT}/Testing/Tcl/TestSetGet.tcl
)
INSTALL_FILES(${VTK_INSTALL_INCLUDE_DIR} FILES
${VTK_SOURCE_DIR}/${KIT}/Testing/Cxx/vtkTestUtilities.h)
IF(VTK_USE_PARALLEL)
INSTALL_FILES(${VTK_INSTALL_PACKAGE_DIR}/testing FILES
SET(__inst_files ${__inst_files}
${VTK_SOURCE_DIR}/${KIT}/Testing/Tcl/prtImageTest.tcl)
ENDIF(VTK_USE_PARALLEL)
INSTALL(FILES ${__inst_files}
DESTINATION ${VTK_INSTALL_PACKAGE_DIR_CM24}/testing
COMPONENT Development)
ENDIF(NOT VTK_INSTALL_NO_DEVELOPMENT)
......@@ -102,11 +102,6 @@ ENDIF(WIN32 OR APPLE)
STRING(COMPARE EQUAL "${VTK_TEST_INSTALL_LEFT}" "${VTK_TEST_INSTALL_RIGHT}"
VTK_TEST_INSTALL)
# No install when using rpaths with CMake before 2.4.
IF(VTK_USE_RPATH AND NOT VTK_INSTALL_HAS_CMAKE_24)
SET(VTK_TEST_INSTALL 0)
ENDIF(VTK_USE_RPATH AND NOT VTK_INSTALL_HAS_CMAKE_24)
# We cannot safely implement the install test unless the configuration
# type is known when the test is run.
IF(NOT VTK_TEST_CONFIG_TYPE_KNOWN)
......
# VTK examples now require CMake 2.0 or higher.
CMAKE_MINIMUM_REQUIRED(VERSION 2.0)
IF(${CMAKE_MAJOR_VERSION}.${CMAKE_MINOR_VERSION} GREATER 1.9)
ELSE(${CMAKE_MAJOR_VERSION}.${CMAKE_MINOR_VERSION} GREATER 1.9)
MESSAGE(FATAL_ERROR "VTKExamples requires CMake 2.0 or higher.")
ENDIF(${CMAKE_MAJOR_VERSION}.${CMAKE_MINOR_VERSION} GREATER 1.9)
CMAKE_MINIMUM_REQUIRED(VERSION 2.4)
# Choose behavior based on whether we are building inside the VTK tree.
IF(VTK_BINARY_DIR)
......
......@@ -333,14 +333,13 @@ IF(CMAKE_COMPILER_IS_GNUCXX AND MINGW)
ENDIF(CMAKE_COMPILER_IS_GNUCXX AND MINGW)
IF(NOT VTK_INSTALL_NO_DEVELOPMENT)
INSTALL_FILES(${VTK_INSTALL_INCLUDE_DIR} .h
vtkAMRBox
vtkCellType
)
INSTALL_FILES(${VTK_INSTALL_INCLUDE_DIR} .txx
vtkImageIterator
vtkImageProgressIterator
INSTALL(FILES
${CMAKE_CURRENT_SOURCE_DIR}/vtkAMRBox.h
${CMAKE_CURRENT_SOURCE_DIR}/vtkCellType.h
${CMAKE_CURRENT_SOURCE_DIR}/vtkImageIterator.txx
${CMAKE_CURRENT_SOURCE_DIR}/vtkImageProgressIterator.txx
DESTINATION ${VTK_INSTALL_INCLUDE_DIR_CM24}
COMPONENT Development
)
ENDIF(NOT VTK_INSTALL_NO_DEVELOPMENT)
......@@ -28,7 +28,10 @@ IF ( WIN32 )
INSTALL_FILES( ${VTK_INSTALL_INCLUDE_DIR} .h )
ENDIF(NOT VTK_INSTALL_NO_DEVELOPMENT)
IF(NOT VTK_INSTALL_NO_LIBRARIES)
INSTALL_TARGETS( ${VTK_INSTALL_LIB_DIR} RUNTIME_DIRECTORY ${VTK_INSTALL_BIN_DIR} vtkMFC )
INSTALL(TARGETS vtkMFC
RUNTIME DESTINATION ${VTK_INSTALL_BIN_DIR_CM24} COMPONENT RuntimeLibraries # .exe, .dll
LIBRARY DESTINATION ${VTK_INSTALL_LIB_DIR_CM24} COMPONENT RuntimeLibraries # .so, mod.dll
ARCHIVE DESTINATION ${VTK_INSTALL_LIB_DIR_CM24} COMPONENT Development # .a, .lib
ENDIF(NOT VTK_INSTALL_NO_LIBRARIES)
ENDIF ( WIN32 )
......
......@@ -170,7 +170,7 @@ IF(BUILD_QVTK_PLUGIN)
ENDIF(DEFINED VTK_INSTALL_QT_PLUGIN_DIR)
# Configure the plugin install script. This is used instead of
# INSTALL_TARGETS to allow the plugin to be installed outside the
# INSTALL TARGETS to allow the plugin to be installed outside the
# main install prefix. Attach the script as a post-install script.
CONFIGURE_FILE(${CMAKE_CURRENT_SOURCE_DIR}/PluginInstall.cmake.in