chipass_add_executable_or_library(ChiPass-cr-recovery CLI
  ChiPass-cr-recovery.cpp
)

# This is normally defined in app-config.h, which is exposed through
# ChiPass_common. Since we're not linking to it to avoid unnecessary
# dependencies, we need to define this manually.
if (CHIPASS_ENABLE_MULTICALL)
  target_compile_definitions(ChiPass-cr-recovery PRIVATE
    CHIPASS_ENABLE_MULTICALL
  )
endif()

if (WIN32 AND MINGW)
  target_compile_options(ChiPass-cr-recovery PRIVATE
    -municode
  )
  target_link_options(ChiPass-cr-recovery PRIVATE
    -municode
  )
endif()

target_link_libraries(ChiPass-cr-recovery PRIVATE
  PkgConfig::botan
)
