Commit a534a6de authored by jcfr's avatar jcfr

COMP: Added Utilites/LastConfigureStep

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 add_subdirectory in the
main CMakeLists.txt.

git-svn-id: http://svn.slicer.org/Slicer4/trunk@16351 3bd1e089-480b-0410-8dfb-8563597acbee
parent 4067247c
...@@ -605,12 +605,15 @@ SET(CMAKE_C_FLAGS ${Slicer_C_FLAGS} CACHE STRING "CMake CXX Flags" FORCE) ...@@ -605,12 +605,15 @@ SET(CMAKE_C_FLAGS ${Slicer_C_FLAGS} CACHE STRING "CMake CXX Flags" FORCE)
SET(Slicer_WC_URL NA) SET(Slicer_WC_URL NA)
SET(Slicer_WC_REVISION 0) SET(Slicer_WC_REVISION 0)
SET(slicer_version_file_source ${CMAKE_CURRENT_SOURCE_DIR}/SlicerVersion.txt.in)
SET(slicer_version_file_binary ${Slicer_HOME}/lib/Slicer3/SlicerVersion.txt)
# Case where Slicer is checkout using SVN # Case where Slicer is checkout using SVN
IF(EXISTS ${CMAKE_CURRENT_SOURCE_DIR}/.svn) IF(EXISTS ${CMAKE_CURRENT_SOURCE_DIR}/.svn)
Subversion_WC_INFO(${CMAKE_CURRENT_SOURCE_DIR} Slicer) Subversion_WC_INFO(${CMAKE_CURRENT_SOURCE_DIR} Slicer)
CONFIGURE_FILE( CONFIGURE_FILE(
${CMAKE_CURRENT_SOURCE_DIR}/SlicerVersion.txt.in ${slicer_version_file_source}
${Slicer_HOME}/lib/Slicer3/SlicerVersion.txt ${slicer_version_file_binary}
) )
ENDIF() ENDIF()
...@@ -618,11 +621,17 @@ ENDIF() ...@@ -618,11 +621,17 @@ ENDIF()
IF(EXISTS ${CMAKE_CURRENT_SOURCE_DIR}/.git/svn/refs/remotes) IF(EXISTS ${CMAKE_CURRENT_SOURCE_DIR}/.git/svn/refs/remotes)
GIT_WC_INFO(${CMAKE_CURRENT_SOURCE_DIR} Slicer) GIT_WC_INFO(${CMAKE_CURRENT_SOURCE_DIR} Slicer)
CONFIGURE_FILE( CONFIGURE_FILE(
${CMAKE_CURRENT_SOURCE_DIR}/SlicerVersion.txt.in ${slicer_version_file_source}
${Slicer_HOME}/lib/Slicer3/SlicerVersion.txt ${slicer_version_file_binary}
) )
ENDIF() ENDIF()
INSTALL(FILES
${slicer_version_file_binary}
DESTINATION ${Slicer_INSTALL_LIB_DIR}
COMPONENT Development
)
#----------------------------------------------------------------------------- #-----------------------------------------------------------------------------
# Includes # Includes
...@@ -754,19 +763,15 @@ ADD_SUBDIRECTORY(Utilities/Doxygen) ...@@ -754,19 +763,15 @@ ADD_SUBDIRECTORY(Utilities/Doxygen)
# Add CMake directory so that install rules associated with *.cmake files are evaluated # Add CMake directory so that install rules associated with *.cmake files are evaluated
ADD_SUBDIRECTORY(CMake) ADD_SUBDIRECTORY(CMake)
#----------------------------------------------------------------------------- #INSTALL(FILES
# Set up for building against a Slicer build tree and a Slicer installation # ${Slicer_BINARY_DIR}/UseSlicer.cmake
#----------------------------------------------------------------------------- # ${Slicer_BINARY_DIR}/Utilities/SlicerConfig.cmake
INCLUDE(${Slicer_SOURCE_DIR}/GenerateSlicerConfig.cmake) # DESTINATION ${Slicer_INSTALL_LIB_DIR}
# COMPONENT Development
CONFIGURE_FILE(${Slicer_SOURCE_DIR}/UseSlicer.cmake.in # )
${Slicer_BINARY_DIR}/UseSlicer.cmake COPYONLY IMMEDIATE)
INSTALL(FILES #-----------------------------------------------------------------------------
# ${Slicer_BINARY_DIR}/Slicer3BuildSettings.cmake # The commands in this directory are intended to be executed as
${Slicer_BINARY_DIR}/UseSlicer.cmake # the end of the whole configuration process, as a "last step".
${Slicer_BINARY_DIR}/Utilities/SlicerConfig.cmake # This directory is typically the last add_subdirectory in the main CMakeLists.txt.
${Slicer_BINARY_DIR}/lib/Slicer3/SlicerVersion.txt ADD_SUBDIRECTORY(Utilities/LastConfigureStep)
DESTINATION ${Slicer_INSTALL_LIB_DIR}
COMPONENT Development
)
################################################################################
#
# Program: 3D Slicer
#
# Copyright (c) 2010 Kitware Inc.
#
# See Doc/copyright/copyright.txt
# or http://www.slicer.org/copyright/copyright.txt for details.
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
#
# This file was originally developed by Jean-Christophe Fillion-Robin, Kitware Inc.
# and was partially funded by NIH grant 3P41RR013218-12S1
#
################################################################################
# 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.
CONFIGURE_FILE(
${Slicer_SOURCE_DIR}/UseSlicer.cmake.in
${Slicer_BINARY_DIR}/UseSlicer.cmake COPYONLY)
#-----------------------------------------------------------------------------
# Create the SlicerConfig.cmake file containing the Slicer configuration.
# Since it might generate configuration file depending
INCLUDE(${Slicer_SOURCE_DIR}/GenerateSlicerConfig.cmake)
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