Skip to content

Commit

Permalink
#2216: Address review comments
Browse files Browse the repository at this point in the history
  • Loading branch information
JacobDomagala committed Apr 23, 2024
1 parent 5069291 commit 0dd8cec
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 3 deletions.
8 changes: 5 additions & 3 deletions cmake/load_bundled_libraries.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -22,11 +22,13 @@ add_subdirectory(${PROJECT_LIB_DIR}/CLI)

# use included fmt or external one
if(${vt_external_fmt})
# user should provide 'fmt_DIR' to CMake (unless fmt is installed in system libs)
if(fmt_DIR)
# user should provide 'fmt_DIR' or 'fmt_ROOT' to CMake (unless fmt is installed in system libs)
if(fmt_ROOT)
message(STATUS "vt_external_fmt = ON. Using fmt located at ${fmt_ROOT}")
elseif(fmt_DIR)
message(STATUS "vt_external_fmt = ON. Using fmt located at ${fmt_DIR}")
else()
message(STATUS "vt_external_fmt = ON but fmt_DIR is not provided!")
message(STATUS "vt_external_fmt = ON but neither fmt_DIR nor fmt_ROOT is provided!")
endif()
find_package(fmt 7.1.0 REQUIRED)

Expand Down
5 changes: 5 additions & 0 deletions cmake/vtConfig.cmake.in
Original file line number Diff line number Diff line change
Expand Up @@ -26,4 +26,9 @@ endif()
set (VT_INCLUDE_DIRS "@CMAKE_INSTALL_PREFIX@/include")
set (VT_CXX_COMPILER "@CMAKE_CXX_COMPILER@")

if (@vt_external_fmt@)
set (fmt_DIR @fmt_DIR@)
find_dependency(fmt REQUIRED HINTS @fmt_DIR@)
endif()

set(VT_HAS_FMT "TRUE")

0 comments on commit 0dd8cec

Please sign in to comment.