if(NOT TARGET libsoplex)
  include("${CMAKE_CURRENT_LIST_DIR}/soplex-targets.cmake")
endif()

include(CMakeFindDependencyMacro)

list(APPEND CMAKE_MODULE_PATH @EXTRA_CMAKE_MODULE_PATH@)

set(SOPLEX_LIBRARIES libsoplex @CONF_SANITIZE_FLAGS@)
set(SOPLEX_PIC_LIBRARIES libsoplex-pic @CONF_SANITIZE_FLAGS@)
set(SOPLEX_INCLUDE_DIRS "@CONF_INCLUDE_DIRS@")
set(SOPLEX_FOUND TRUE)

# If SoPlex was built with MPFR then we also need it.
set(SOPLEX_WITH_MPFR @SOPLEX_WITH_MPFR@)
if(SOPLEX_WITH_MPFR)
   if(NOT MPFR_DIR)
      set(MPFR_DIR "@MPFR_DIR@")
   endif()
   find_dependency(MPFR)

   # TODO: Once we use targets, this will not be needed.
   set(SOPLEX_INCLUDE_DIRS ${SOPLEX_INCLUDE_DIRS} ${MPFR_INCLUDE_DIRS})
endif()

if(@SOPLEX_WITH_BOOST@)
  find_package(Boost @BOOST_MINIMUM_VERSION@)
  set(libs ${libs} Boost::boost)
endif()

if(@SOPLEX_WITH_PAPILO@)
  set(SOPLEX_WITH_PAPILO TRUE)
endif()
