# =================================================================
# siconos configuration file.
# Check https://cmake.org/cmake/help/latest/manual/cmake-packages.7.html#creating-packages
# This file has been generated during siconos install and
# may be used by another cmake project to retrieve all the configuration variables
# of siconos.
#
#
# Usage :
# 
# find_package(siconos)
#  ... define some target ...
# target_link_libraries(my_target ${siconos_LIBRARIES})
#
# A call to find_package(siconos) will define targets
# Siconos::<component> with component = externals, numerics, kernel ...
# 

@PACKAGE_INIT@

include(CMakeFindDependencyMacro)

# Name of the siconos package
set(PACKAGE_NAME siconos)

# set path to siconos installation
set_and_check(siconos_ROOT "@CMAKE_INSTALL_PREFIX@")

# set list of targets build by siconos project
set(installed_targets "@installed_targets@")

# Path (relative to siconos install) to cmake extra tools
set(SICONOS_CMAKE_MODULE_PATH @CMAKE_INSTALL_PREFIX@/@ConfigPackageLocation@)
list(APPEND CMAKE_MODULE_PATH ${SICONOS_CMAKE_MODULE_PATH})
# include siconos project targets
include("${CMAKE_CURRENT_LIST_DIR}/siconosTargets.cmake")

set(CMAKE_CXX_STANDARD @CMAKE_CXX_STANDARD@)

# --- Siconos extra components or options ---
set(HAS_PYTHON_WRAPPER @WITH_PYTHON_WRAPPER@)
if(HAS_PYTHON_WRAPPER)
  set(PYTHON_EXECUTABLE  @PYTHON_EXECUTABLE@)
  set(Python3_EXECUTABLE @Python3_EXECUTABLE@)
endif()

# --- Numerics component extras ---
set(HAS_ONE_LP_SOLVER @HAS_ONE_LP_SOLVER@)

# --- Mechanics component extras ---
# mechanics component with bullet?
set(SICONOS_HAS_BULLET @SICONOS_HAS_BULLET@)

# mechanics (and/or mechanisms) component with oce?
set(SICONOS_HAS_OCE @SICONOS_HAS_OCE@)

if(@WITH_FCLIB@)
  if(${CMAKE_VERSION} VERSION_GREATER "3.12.0")
    set(FCLIB_ROOT @FCLIB_ROOT@)
  else()
    set(FCLIB_DIR @FCLIB_DIR@)
  endif()
  
  # Look for fclib in default path, FCLIB_DIR (cmake <3.12)
  # and/or FCLIB_ROOT (cmake >= 3.12).
  find_dependency(FCLIB 3.0.0 CONFIG REQUIRED)
endif()


# --- Final check to set (or not) siconos_FOUND, siconos_numerics_FOUND and so on
check_required_components(siconos)


