##############################################################################
# @file  @CONFIG_FILE@
# @brief CMake package configuration file of @PROJECT_NAME@ of @PROJECT_PACKAGE_NAME@.
#
# @note The @CONFIG_FILE@ file is automatically generated
#       by BASIS from the template file ModuleConfig.cmake.in which is part of the
#       BASIS installation.
#
# @ingroup BasisConfig
##############################################################################

# ============================================================================
# namespace
# ============================================================================

@BASIS_NS@

# ----------------------------------------------------------------------------
macro (basis_set_config NAME)
  set (${NS}${NAME} ${ARGN})
endmacro ()

# ----------------------------------------------------------------------------
macro (basis_copy_config NAME SRC)
  set (${NS}${NAME} ${${NS}${SRC}})
endmacro ()

# ----------------------------------------------------------------------------
macro (basis_append_config NAME)
  list (APPEND ${NS}${NAME} ${ARGN})
endmacro ()

# ----------------------------------------------------------------------------
macro (basis_remove_duplicates_config NAME)
  if (${NS}${NAME})
    list (REMOVE_DUPLICATES ${NS}${NAME})
  endif ()
endmacro ()

# ----------------------------------------------------------------------------
macro (basis_remove_item_config NAME ITEM)
  if (${NS}${NAME})
    list (REMOVE_ITEM ${NS}${NAME} "${ITEM}")
  endif ()
endmacro ()

# ============================================================================
# general
# ============================================================================

## @brief Installation prefix or root of build tree.
basis_set_config (INSTALL_PREFIX "@INSTALL_PREFIX_CONFIG@")
get_filename_component (${NS}INSTALL_PREFIX "${${NS}INSTALL_PREFIX}" ABSOLUTE)

## @brief Project use file to be included by other projects.
basis_set_config (USE_FILE "${CMAKE_CURRENT_LIST_DIR}/@USE_FILE@")

## @brief Directory of example files.
basis_set_config (EXAMPLE_DIR "@EXAMPLE_DIR_CONFIG@")

# ============================================================================
# libraries
# ============================================================================

## @brief Directory of header files.
basis_set_config (INCLUDE_DIR "@INCLUDE_DIR_CONFIG@")

## @brief Directory of header files including dependencies.
basis_set_config    (INCLUDE_DIRS) # to have a set recognized by Doxygen filter
basis_copy_config   (INCLUDE_DIRS INCLUDE_DIR)
basis_append_config (INCLUDE_DIRS "@INCLUDE_DIRS_CONFIG@")

## @brief Directory of libraries.
basis_set_config (LIBRARY_DIR "@LIBRARY_DIR_CONFIG@")

## @brief Directory of libraries including dependencies.
basis_set_config    (LIBRARY_DIRS) # to have a set() recognized by Doxygen filter
basis_copy_config   (LIBRARY_DIRS LIBRARY_DIR)
basis_append_config (LIBRARY_DIRS "@LIBRARY_DIRS_CONFIG@")

## @brief Search path for Python modules.
basis_set_config (PYTHONPATH "@PYTHONPATH_CONFIG@")

## @brief Search path for Jython modules.
basis_set_config (JYTHONPATH "@JYTHONPATH_CONFIG@")

## @brief Search path for Perl modules.
basis_set_config (PERL5LIB "@PERL5LIB_CONFIG@")

## @brief Search path for MATLAB modules.
basis_set_config (MATLABPATH "@MATLABPATH_CONFIG@")

## @brief Search path for Bash modules.
#
# See the import() function of the BASIS Bash utilities.
basis_set_config (BASHPATH "@BASHPATH_CONFIG@")

# ============================================================================
# exports
# ============================================================================

## @brief Absolute path of exports file to be included by other projects.
basis_set_config (EXPORTS_FILE "${CMAKE_CURRENT_LIST_DIR}/@EXPORTS_FILE@")

## @brief Absolute path of custom exports file to be included by other projects.
basis_set_config (CUSTOM_EXPORTS_FILE "${CMAKE_CURRENT_LIST_DIR}/@CUSTOM_EXPORTS_FILE@")

# ============================================================================
# dependencies
# ============================================================================

@DEPENDS_CONFIG@
