get_filename_component(Sopt_CMAKE_DIR "${CMAKE_CURRENT_LIST_FILE}" PATH)
message(STATUS "Linking to sopt package in ${Sopt_CMAKE_DIR}")
set(Sopt_INCLUDE_DIRS "@ALL_INCLUDE_DIRS@")
if(NOT TARGET libsopt AND EXISTS "${Sopt_CMAKE_DIR}/SoptCTargets.cmake")
  include("${Sopt_CMAKE_DIR}/SoptCTargets.cmake")
endif()
if(NOT TARGET sopt AND EXISTS "${Sopt_CMAKE_DIR}/SoptCPPTargets.cmake")
  include("${Sopt_CMAKE_DIR}/SoptCPPTargets.cmake")
endif()

unset(Sopt_LIBRARIES)
if(TARGET sopt)
  list(APPEND Sopt_LIBRARIES sopt)
  set(Sopt_CPP_LIBRARY sopt)
endif()
if(TARGET libsopt)
  list(APPEND Sopt_LIBRARIES libsopt)
  set(Sopt_C_LIBRARY libsopt)
endif()
set(Sopt_HAS_MPI @SOPT_MPI@)
