1if(NOT trout_FMTLIB_ROOT_DIR)
2  set(trout_FMTLIB_ROOT_DIR ${CMAKE_CURRENT_SOURCE_DIR}/third_party/fmtlib)
3endif()
4
5if(EXISTS "${trout_FMTLIB_ROOT_DIR}/CMakeLists.txt")
6  set(trout_FMTLIB_INCLUDE_DIRS "${trout_FMTLIB_ROOT_DIR}/include")
7  set(trout_FMTLIB_LIBRARIES "fmt")
8  if (NOT TARGET ${trout_FMTLIB_LIBRARIES})
9    add_subdirectory(${trout_FMTLIB_ROOT_DIR} third_party/fmtlib)
10  endif()
11
12else()
13  message(FATAL_ERROR "${trout_FMTLIB_ROOT_DIR}/CMakeLists.txt not found")
14endif()
15
16