find_package(Catch2 CONFIG REQUIRED)
find_package(CLI11 CONFIG REQUIRED)

# Conan CMakeDeps replaces Catch2's native config, omitting its extras
# (Catch.cmake which provides catch_discover_tests).  Recover the module path
# from the installed package directory.
foreach(_cfg RELEASE DEBUG RELWITHDEBINFO MINSIZEREL)
  if(DEFINED catch2_PACKAGE_FOLDER_${_cfg})
    list(APPEND CMAKE_MODULE_PATH
      "${catch2_PACKAGE_FOLDER_${_cfg}}/lib/cmake/Catch2")
    break()
  endif()
endforeach()
include(Catch)
include(CTest)

# Common test library
add_subdirectory(common)

# Test subdirectories
add_subdirectory(decoder)
add_subdirectory(configurator)
add_subdirectory(integration)
