Commit 6ebeea4b authored by Sebastien Barre's avatar Sebastien Barre
Browse files

FIX: , allright I think I nailed it, VTKConfig.cmake has to be configured in...

FIX: , allright I think I nailed it, VTKConfig.cmake has to be configured in IMMEDIATE mode, yet it should be able to use variable that are defined in subdirs (Utilities/TclTk). To enable that, add a last SUBDIRS at the end of the main CMakeLists file, and call vtkGenerateVTKConfig.cmake inside it.
parent e136ee53
......@@ -843,9 +843,6 @@ INSTALL_FILES(/lib/vtk .cmake VTKBuildSettings)
# Save library dependencies.
EXPORT_LIBRARY_DEPENDENCIES(${VTK_BINARY_DIR}/VTKLibraryDepends.cmake)
# 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)
......@@ -866,6 +863,12 @@ SET(CMAKE_EXE_LINKER_FLAGS "${CMAKE_EXE_LINKER_FLAGS} ${VTK_REQUIRED_EXE_LINKER_
INCLUDE(${VTK_BINARY_DIR}/LocalUserOptions.cmake OPTIONAL)
INCLUDE(${VTK_SOURCE_DIR}/LocalUserOptions.cmake OPTIONAL)
#-----------------------------------------------------------------------------
# The commands in this directory are intended to be executed as
# 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.7)
......
# The commands in this directory are intended to be executed as
# the end of the whole configuration process, as a "last step".
# This directory is typically the last SUBDIRS in the main CMakeLists.txt.
# It enable the above commands to use variables that might have been configured
# in previous SUBDIRS. This is especially important when it comes to
# the CONFIGURE_FILE command, since in IMMEDIATE mode that command will
# use the current values of CMake variables instead of waiting until the
# end of CMakeLists processing, i.e. instead of waiting until some variables
# are configured in SUBDIRS.
#-----------------------------------------------------------------------------
# Create the VTKConfig.cmake file containing the VTK configuration.
# Since it might generate configuration file depending
INCLUDE(${VTK_SOURCE_DIR}/vtkGenerateVTKConfig.cmake)
......@@ -95,7 +95,7 @@ SET(VTK_LIBRARY_DEPENDS_FILE "${VTK_BINARY_DIR}/VTKLibraryDepends.cmake")
#-----------------------------------------------------------------------------
# Configure VTKConfig.cmake for the build tree.
CONFIGURE_FILE(${VTK_SOURCE_DIR}/VTKConfig.cmake.in
${VTK_BINARY_DIR}/VTKConfig.cmake @ONLY)
${VTK_BINARY_DIR}/VTKConfig.cmake @ONLY IMMEDIATE)
# Hack to give source tree access for a build tree configuration.
STRING(ASCII 35 VTK_STRING_POUND)
......@@ -203,4 +203,4 @@ SET(VTK_LIBRARY_DEPENDS_FILE "${CMAKE_INSTALL_PREFIX}/lib/vtk/VTKLibraryDepends.
#-----------------------------------------------------------------------------
# Configure VTKConfig.cmake for the install tree.
CONFIGURE_FILE(${VTK_SOURCE_DIR}/VTKConfig.cmake.in
${VTK_BINARY_DIR}/Utilities/VTKConfig.cmake @ONLY)
${VTK_BINARY_DIR}/Utilities/VTKConfig.cmake @ONLY IMMEDIATE)
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment