#Setup the CMake module paths
list(APPEND CMAKE_MODULE_PATH "@SMTK_MODULE_DIR@;@SMTK_VTK_MODULE_DIR@")
set(smtk_module_dir "@SMTK_VTK_MODULE_DIR@/Modules")
if(IS_DIRECTORY "${smtk_module_dir}")
  list(APPEND CMAKE_MODULE_PATH "${smtk_module_dir}")
  file(GLOB config_files RELATIVE "${smtk_module_dir}" "${smtk_module_dir}/*.cmake")
  foreach (_file IN LISTS config_files)
    if (NOT _file MATCHES "[^\\-]+-[a-zA-Z]+\\.cmake")
      string(REGEX REPLACE "\\.cmake$" "" _module "${_file}")
      list(APPEND VTK_MODULES_ENABLED "${_module}")
    endif()
  endforeach()
endif()
unset(smtk_module_dir)

#When building documentation internally we re-import ourselves, which
#doesnt work and generates CMake warnings. So we will only look for SMTK
#if the smtkCore target doesn't already exist
if(TARGET smtkCore)
else()

  set(SMTK_USE_SYSTEM_MOAB @SMTK_USE_SYSTEM_MOAB@)
  if(SMTK_USE_SYSTEM_MOAB)
    set(MOAB_ROOT_DIR "@MOAB_ROOT_DIR@")
    find_package(MOAB REQUIRED)
  endif()

  set(SMTK_ENABLE_REMUS_SUPPORT @SMTK_ENABLE_REMUS_SUPPORT@)
  if(SMTK_ENABLE_REMUS_SUPPORT)
    find_package(Remus REQUIRED)
  endif()

  include("@SMTK_CONFIG_DIR@/SMTKTargets.cmake")
endif()
