Commit 58451258 authored by millerjv's avatar millerjv
Browse files

ENH: clean up the Slicer configuration for building modules against Slicer...

ENH: clean up the Slicer configuration for building modules against Slicer builds and installations to use the UseVTK.cmake file instead of setting the include and library dirs explicitly.  May want to do the same with teem.

git-svn-id: http://svn.slicer.org/Slicer4/trunk@5683 3bd1e089-480b-0410-8dfb-8563597acbee
parent bdc1202d
......@@ -26,9 +26,10 @@ SET(TCLAP_DIR_CONFIG ${Slicer3_BINARY_DIR}/Libs/tclap)
SET(ModuleDescriptionParser_DIR_CONFIG ${Slicer3_BINARY_DIR}/Libs/ModuleDescriptionParser)
SET(GenerateCLP_DIR_CONFIG ${Slicer3_BINARY_DIR}/Libs/GenerateCLP)
SET(GenerateCLP_USE_FILE_CONFIG ${Slicer3_BINARY_DIR}/Libs/GenerateCLP/UseGenerateCLP.cmake)
SET(Slicer3_INCLUDE_DIRS_CONFIG ${Slicer3_BINARY_DIR}/Libs/MRML ${Slicer3_SOURCE_DIR}/Libs/MRML ${Slicer3_BINARY_DIR}/Base/CLI ${Slicer3_SOURCE_DIR}/Base/CLI ${VTK_INCLUDE_DIRS})
SET(Slicer3_LIBRARY_DIRS_CONFIG ${Slicer3_BINARY_DIR}/bin ${VTK_LIBRARY_DIRS})
SET(Slicer3_INCLUDE_DIRS_CONFIG ${Slicer3_BINARY_DIR}/Libs/MRML ${Slicer3_SOURCE_DIR}/Libs/MRML ${Slicer3_BINARY_DIR}/Base/CLI ${Slicer3_SOURCE_DIR}/Base/CLI)
SET(Slicer3_LIBRARY_DIRS_CONFIG ${Slicer3_BINARY_DIR}/bin)
SET(ITK_DIR_CONFIG ${ITK_DIR})
SET(VTK_DIR_CONFIG ${VTK_DIR})
# Configure Slicer3Config.cmake for the install tree.
CONFIGURE_FILE(${Slicer3_SOURCE_DIR}/Slicer3Config.cmake.in
......
......@@ -39,3 +39,5 @@ SET(ModuleDescriptionParser_DIR "@ModuleDescriptionParser_DIR_CONFIG@")
SET(GenerateCLP_DIR "@GenerateCLP_DIR_CONFIG@")
SET(GenerateCLP_USE_FILE "@GenerateCLP_USE_FILE_CONFIG@")
SET(GENERATECLP_EXE "@GENERATECLP_EXE_CONFIG@")
SET(ITK_DIR "@ITK_DIR_CONFIG@")
SET(VTK_DIR "@VTK_DIR_CONFIG@")
......@@ -13,7 +13,7 @@
GET_FILENAME_COMPONENT(Slicer3_CONFIG_DIR "${CMAKE_CURRENT_LIST_FILE}" PATH)
# The Slicer3 include file directories.
SET(Slicer3_INCLUDE_DIRS "${Slicer3_CONFIG_DIR}/../../include/Slicer3" "${Slicer3_CONFIG_DIR}/../../include/MRML" "${Slicer3_CONFIG_DIR}/../../include/vtk-5.0")
SET(Slicer3_INCLUDE_DIRS "${Slicer3_CONFIG_DIR}/../../include/Slicer3" "${Slicer3_CONFIG_DIR}/../../include/MRML")
# The Slicer3 library directories.
# ${Slicer3_CONFIG_DIR}/.. is needed for VTK and teem
......@@ -45,3 +45,7 @@ SET(ModuleDescriptionParser_DIR "${Slicer3_CONFIG_DIR}/../ModuleDescriptionParse
SET(GenerateCLP_DIR "${Slicer3_CONFIG_DIR}/../GenerateCLP")
SET(GenerateCLP_USE_FILE "${GenerateCLP_DIR}/UseGenerateCLP.cmake")
SET(GENERATECLP_EXE "${Slicer3_CONFIG_DIR}/../../bin/GenerateCLP")
SET(ITK_DIR "${Slicer3_CONFIG_DIR}/../InsightToolkit")
# VTK_DIR needs to be an absolute path for the VTKConfig.cmake file to work
SET(VTK_DIR "${Slicer3_CONFIG_DIR}/../vtk-5.0")
GET_FILENAME_COMPONENT(VTK_DIR ${VTK_DIR} ABSOLUTE)
......@@ -9,6 +9,11 @@ IF(GenerateCLP_FOUND)
INCLUDE(${GenerateCLP_USE_FILE})
ENDIF(GenerateCLP_FOUND)
FIND_PACKAGE(VTK)
IF(VTK_FOUND)
INCLUDE(${VTK_USE_FILE})
ENDIF(VTK_FOUND)
#IF(Slicer3_BUILD_SETTINGS_FILE)
# INCLUDE(${CMAKE_ROOT}/Modules/CMakeImportBuildSettings.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