#
# SlicerConfig.cmake - Slicer CMake configuration file for external projects
#
# This file is configured by Slicer and used by UseSlicer.cmake module
# to load Slicer's settings for an external project. External projects
# can use these setting to build new modules against a Slicer build tree
# or a Slicer installation.
#

# The C and C++ flags added by Slicer to the cmake-configured flags.
set(Slicer_REQUIRED_C_FLAGS "@Slicer_REQUIRED_C_FLAGS@")
set(Slicer_REQUIRED_CXX_FLAGS "@Slicer_REQUIRED_CXX_FLAGS@")
set(Slicer_REQUIRED_LINK_FLAGS "@Slicer_REQUIRED_LINK_FLAGS@")

# Whether Slicer was built with modules and CLI support.
# CLI support is always enabled and cannot be disabled.
# This variable is retained only for backward compatibility with dependent projects (e.g., Slicer extensions).
# For more details, see: https://github.com/Slicer/Slicer/issues/8477
set(Slicer_BUILD_CLI_SUPPORT ON)
set(Slicer_BUILD_CLI "@Slicer_BUILD_CLI@")
set(Slicer_BUILD_EXTENSIONMANAGER_SUPPORT "@Slicer_BUILD_EXTENSIONMANAGER_SUPPORT@")
set(Slicer_BUILD_APPLICATIONUPDATE_SUPPORT "@Slicer_BUILD_APPLICATIONUPDATE_SUPPORT@")
set(Slicer_BUILD_QTLOADABLEMODULES "@Slicer_BUILD_QTLOADABLEMODULES@")

# Whether Slicer was built with shared libraries.
set(Slicer_BUILD_SHARED "@BUILD_SHARED_LIBS@")

# Slicer options
set(Slicer_USE_IGSTK "@Slicer_USE_IGSTK@")
set(Slicer_USE_NAVITRACK "@Slicer_USE_NAVITRACK@")
set(Slicer_USE_NUMPY "@Slicer_USE_NUMPY@")
set(Slicer_USE_SCIPY "@Slicer_USE_SCIPY@")
set(Slicer_USE_PYTHONQT "@Slicer_USE_PYTHONQT@")
set(Slicer_USE_OPENTRACKER "@Slicer_USE_OPENTRACKER@")

# Slicer could be installed anywhere, so set all paths based on where
# this file was found (which should be the lib/Slicer3 directory of the
# installation)
get_filename_component(Slicer_CONFIG_DIR "${CMAKE_CURRENT_LIST_FILE}" PATH)

# Slicer home (top of the tree)
set(Slicer_HOME "${Slicer_CONFIG_DIR}/../..")
get_filename_component(Slicer_HOME ${Slicer_HOME} ABSOLUTE)

# The CMake macros dir.
set(Slicer_CMAKE_DIR "${Slicer_HOME}/@Slicer_INSTALL_LIB_DIR@/CMake")

# Slicer Libs library directories.
set(Slicer_Libs_LIBRARY_DIRS
  "${Slicer_HOME}/lib/IGT"
  "${Slicer_HOME}/lib/ITKCommandIO"
  "${Slicer_HOME}/lib/LoadableModule"
  "${Slicer_HOME}/lib/MGHImageIO"
  "${Slicer_HOME}/lib/MRML"
  "${Slicer_HOME}/lib/MRMLIDImageIO"
  "${Slicer_HOME}/lib/ModuleDescriptionParser"
  "${Slicer_HOME}/lib/Qdec"
  "${Slicer_HOME}/lib/tclap"
  "${Slicer_HOME}/lib/vtkAddon"
  "${Slicer_HOME}/lib/vtkITK"
  "${Slicer_HOME}/lib/vtkSegmentationCore"
  "${Slicer_HOME}/lib/vtkTeem"
  "${Slicer_HOME}/lib/TclTk/lib"
  "${Slicer_HOME}/lib/TclTk/lib/itcl@INCR_TCL_VERSION_DOT@"
  "${Slicer_HOME}/lib/TclTk/lib/itk@INCR_TCL_VERSION_DOT@"
  )

# Slicer Libs include file directories.
set(Slicer_Libs_INCLUDE_DIRS
  "${Slicer_HOME}/include/IGT"
  "${Slicer_HOME}/include/ITKCommandIO"
  "${Slicer_HOME}/include/LoadableModule"
  "${Slicer_HOME}/include/MGHImageIO"
  "${Slicer_HOME}/include/MRML"
  "${Slicer_HOME}/include/MRMLIDImageIO"
  "${Slicer_HOME}/include/ModuleDescriptionParser"
  "${Slicer_HOME}/include/Qdec"
  "${Slicer_HOME}/include/tclap"
  "${Slicer_HOME}/include/vtkAddon"
  "${Slicer_HOME}/include/vtkITK"
  "${Slicer_HOME}/include/vtkSegmentationCore"
  "${Slicer_HOME}/include/vtkTeem"
  )

# Slicer Base library directories.
set(Slicer_Base_LIBRARY_DIRS
  "${Slicer_HOME}/@Slicer_INSTALL_LIB_DIR@"
  )

# Slicer Base include file directories.
set(Slicer_Base_INCLUDE_DIRS
  "${Slicer_HOME}/@Slicer_INSTALL_INCLUDE_DIR@"
  "${Slicer_HOME}/@Slicer_INSTALL_INCLUDE_DIR@/SlicerBaseCLI"
  "${Slicer_HOME}/@Slicer_INSTALL_INCLUDE_DIR@/SlicerBaseGUI"
  "${Slicer_HOME}/@Slicer_INSTALL_INCLUDE_DIR@/SlicerBaseLogic"
  )

# The location of the UseSlicer.cmake file.
set(Slicer_USE_FILE "${Slicer_CONFIG_DIR}/UseSlicer.cmake")

# The build settings file.
set(Slicer_BUILD_SETTINGS_FILE
  "${Slicer_CONFIG_DIR}/SlicerBuildSettings.cmake")

# The Slicer relative install directories.
set(Slicer_INSTALL_BIN_DIR "@Slicer_INSTALL_BIN_DIR@")
set(Slicer_INSTALL_LIB_DIR "@Slicer_INSTALL_LIB_DIR@")
set(Slicer_INSTALL_INCLUDE_DIR "@Slicer_INSTALL_INCLUDE_DIR@")
set(Slicer_INSTALL_SHARE_DIR "@Slicer_INSTALL_SHARE_DIR@")
set(Slicer_INSTALL_ITKFACTORIES_DIR "@Slicer_INSTALL_ITKFACTORIES_DIR@")

set(Slicer_INSTALL_CLIMODULES_BIN_DIR "@Slicer_INSTALL_CLIMODULES_BIN_DIR@")
set(Slicer_INSTALL_CLIMODULES_LIB_DIR "@Slicer_INSTALL_CLIMODULES_LIB_DIR@")
set(Slicer_INSTALL_CLIMODULES_SHARE_DIR "@Slicer_INSTALL_CLIMODULES_SHARE_DIR@")

if(Slicer_BUILD_QTLOADABLEMODULES)
  set(Slicer_INSTALL_QTLOADABLEMODULES_BIN_DIR "@Slicer_INSTALL_QTLOADABLEMODULES_BIN_DIR@")
  set(Slicer_INSTALL_QTLOADABLEMODULES_LIB_DIR "@Slicer_INSTALL_QTLOADABLEMODULES_LIB_DIR@")
  set(Slicer_INSTALL_QTLOADABLEMODULES_INCLUDE_DIR "@Slicer_INSTALL_QTLOADABLEMODULES_INCLUDE_DIR@")
  set(Slicer_INSTALL_QTLOADABLEMODULES_SHARE_DIR "@Slicer_INSTALL_QTLOADABLEMODULES_SHARE_DIR@")
endif()

# Components needed to build modules from outside a Slicer build tree or
# from outside a Slicer installation tree
set(TCLAP_DIR "${Slicer_HOME}/lib/tclap")
set(ModuleDescriptionParser_DIR "${Slicer_HOME}/lib/ModuleDescriptionParser")
set(GenerateCLP_DIR "${Slicer_HOME}/lib/GenerateCLP")
set(GenerateLM_DIR "${Slicer_HOME}/lib/GenerateLM")
set(ITK_DIR "${Slicer_HOME}/lib/${ITK_LIB_DIR}")
set(LoadableModule_DIR "${Slicer_HOME}/lib/LoadableModule")
set(Teem_DIR "${Slicer_HOME}/lib/Teem-@Teem_VERSION_MAJOR@.@Teem_VERSION_MINOR@.@Teem_VERSION_PATCH@")
set(VTK_DIR "${Slicer_HOME}/lib/vtk-@VTK_MAJOR_VERSION@.@VTK_MINOR_VERSION@")
set(PYTHON_INCLUDE_PATH "@PYTHON_INCLUDE_PATH@")
get_filename_component(PYTHON_LIB_FILE "${PYTHON_LIBRARY}" NAME)
set(PYTHON_LIBRARIES "${Slicer_HOME}/lib/Python/lib/${PYTHON_LIB_FILE}")
get_filename_component(PYTHON_INCLUDE_DIR "${PYTHON_INCLUDE_PATH}" NAME)
set(PYTHON_INCLUDE_PATH "${Slicer_HOME}/lib/Python/include/${PYTHON_INCLUDE_DIR}")
