cmake_minimum_required(VERSION 3.16)
project(SuperJupiterTimeAnchorConsumer LANGUAGES CXX)
if(DEFINED SUPERJUPITER_TIME_ANCHOR_SOURCE_DIR)
  add_subdirectory("${SUPERJUPITER_TIME_ANCHOR_SOURCE_DIR}" time-anchor)
  if(TARGET superjupiter-time-anchor-tests OR TARGET superjupiter-time-anchor-replay)
    message(FATAL_ERROR "A consumer unexpectedly builds library developer tools")
  endif()
else()
  find_package(SuperJupiterTimeAnchor 0.1 CONFIG REQUIRED)
endif()
add_executable(superjupiter-time-anchor-consumer main.cpp)
target_link_libraries(superjupiter-time-anchor-consumer PRIVATE SuperJupiter::TimeAnchor)
