#-----------------------------------------------------------------------------
#
# ITKConfig.cmake - ITK CMake configuration file for external projects.
#
# This file is configured by ITK and used by the UseITK.cmake module
# to load ITK's settings for an external project.
#
# ITK components can be specified when using the CMake function `find_package()`
# E.g. find_package(ITK COMPONENTS ITKCommon ITKIOImageBase ITKIONRRD ITKImageGradient)
#
# The components listed in this call must be ITK module names or factories
# (e.g. ITKImageIO, ITKTransformIO). Factories allow the user to load all the
# modules of a specific type (e.g. ImageIO, TransformIO) without having to
# specify them individually.
# See `itk_module_config()` documentation for more information about factory modules.

@ITK_CONFIG_CODE@

# The C and C++ flags added by ITK to the cmake-configured flags.
set(ITK_REQUIRED_C_FLAGS "@ITK_REQUIRED_C_FLAGS@")
set(ITK_REQUIRED_CXX_FLAGS "@ITK_REQUIRED_CXX_FLAGS@")
set(ITK_REQUIRED_LINK_FLAGS "@ITK_REQUIRED_LINK_FLAGS@")

# The ITK version number
set(ITK_VERSION_MAJOR "@ITK_VERSION_MAJOR@")
set(ITK_VERSION_MINOR "@ITK_VERSION_MINOR@")
set(ITK_VERSION_PATCH "@ITK_VERSION_PATCH@")

# If ITK was built with version 3 compatibility features.
set(ITKV3_COMPATIBILITY "@ITKV3_COMPATIBILITY@")

# Remove all legacy code completely.
set(ITK_LEGACY_REMOVE "@ITK_LEGACY_REMOVE@")

# Silence all legacy code messages.
set(ITK_LEGACY_SILENT "@ITK_LEGACY_SILENT@")

# Remove code that will become legacy in future releases completely.
set(ITK_FUTURE_LEGACY_REMOVE "@ITK_FUTURE_LEGACY_REMOVE@")

# ITK's CMake directory with modules ITK uses.
set(ITK_CMAKE_DIR "@ITK_CONFIG_CMAKE_DIR@")

# The location of the UseITK.cmake file.
set(ITK_USE_FILE "@ITK_USE_FILE@")

# Whether ITK was built with shared libraries.
set(ITK_BUILD_SHARED "@ITK_BUILD_SHARED_LIBS@")

# Whether ITK examples were built.
set(ITK_BUILD_EXAMPLES "@BUILD_EXAMPLES@")

# Whether ITK documentation was built.
set(ITK_BUILD_DOCUMENTATION "@BUILD_DOCUMENTATION@")

# List of available ITK modules.
set(ITK_MODULES_ENABLED "@ITK_CONFIG_MODULES_ENABLED@")

# Import ITK targets.
set(ITK_CONFIG_TARGETS_FILE "@ITK_CONFIG_TARGETS_FILE@")
if(NOT ITK_TARGETS_IMPORTED@ITK_CONFIG_TARGETS_CONDITION@)
  set(ITK_TARGETS_IMPORTED 1)
  include("${ITK_CONFIG_TARGETS_FILE}")
endif()

# Load module interface macros.
include("@ITK_CONFIG_MODULE_API_FILE@")
# Load requested modules and their dependencies into variables:
#  ITK_LIBRARIES       = Libraries to link
#  ITK_INCLUDE_DIRS    = Header file search path
#  ITK_LIBRARY_DIRS    = Library search path (for outside dependencies)
#  ITK_RUNTIME_LIBRARY_DIRS = Runtime linker search path
#  ITK_FACTORY_NAMES = List of <module>::<factory>::<format>
#  ITK_FACTORY_LIST  = List of factories set
#  ITK_<factory_name> = List of formats for each factory
itk_module_config(ITK ${ITK_MODULES_ENABLED})

# Compute set of requested modules.
if(ITK_FIND_COMPONENTS)
  set(ITK_MODULES_REQUESTED ${ITK_FIND_COMPONENTS})
  # Specific modules requested by find_package(ITK).
  itk_module_config(ITK ${ITK_MODULES_REQUESTED})
else()
  set(ITK_MODULES_REQUESTED ${ITK_MODULES_ENABLED})
endif()

# Add configuration with FFTW
set(ITK_USE_FFTWD "@ITK_USE_FFTWD@")
set(ITK_USE_FFTWF "@ITK_USE_FFTWF@")
set(ITK_USE_SYSTEM_FFTW "@ITK_USE_SYSTEM_FFTW@")
set(ITK_FFTW_INCLUDE_PATH "@FFTW_INCLUDE_PATH@")
set(ITK_FFTW_LIBDIR "@FFTW_LIBDIR@")

# Add FFTW include and library directories
if (ITK_USE_FFTWF OR ITK_USE_FFTWD)
  set(ITK_INCLUDE_DIRS ${ITK_INCLUDE_DIRS} "${ITK_FFTW_INCLUDE_PATH}")
  set(ITK_LIBRARY_DIRS ${ITK_LIBRARY_DIRS} "${ITK_FFTW_LIBDIR}")
endif()

# Add configuration with GPU
set(ITK_USE_GPU "@ITK_USE_GPU@")

# Wrapping
set(ITK_WRAPPING "@ITK_WRAPPING@")
if( NOT DEFINED ITK_WRAP_PYTHON)
  set(ITK_WRAP_PYTHON "@ITK_WRAP_PYTHON@")
endif()
if( NOT DEFINED ITK_WRAP_JAVA)
  set(ITK_WRAP_JAVA "@ITK_WRAP_JAVA@")
endif()
if(NOT DEFINED ITK_WRAP_RUBY)
  set(ITK_WRAP_RUBY "@ITK_WRAP_RUBY@")
endif()
if( NOT DEFINED ITK_WRAP_PERL)
  set(ITK_WRAP_PERL "@ITK_WRAP_PERL@")
endif()
if(NOT DEFINED ITK_WRAP_TCL)
  set(ITK_WRAP_TCL "@ITK_WRAP_TCL@")
endif()

set(ITK_WRAP_PYTHON_VERSION "@PYTHON_VERSION_STRING@")
