Skip to content

Commit 0dd8cec

Browse files
committed
#2216: Address review comments
1 parent 5069291 commit 0dd8cec

File tree

2 files changed

+10
-3
lines changed

2 files changed

+10
-3
lines changed

cmake/load_bundled_libraries.cmake

+5-3
Original file line numberDiff line numberDiff line change
@@ -22,11 +22,13 @@ add_subdirectory(${PROJECT_LIB_DIR}/CLI)
2222

2323
# use included fmt or external one
2424
if(${vt_external_fmt})
25-
# user should provide 'fmt_DIR' to CMake (unless fmt is installed in system libs)
26-
if(fmt_DIR)
25+
# user should provide 'fmt_DIR' or 'fmt_ROOT' to CMake (unless fmt is installed in system libs)
26+
if(fmt_ROOT)
27+
message(STATUS "vt_external_fmt = ON. Using fmt located at ${fmt_ROOT}")
28+
elseif(fmt_DIR)
2729
message(STATUS "vt_external_fmt = ON. Using fmt located at ${fmt_DIR}")
2830
else()
29-
message(STATUS "vt_external_fmt = ON but fmt_DIR is not provided!")
31+
message(STATUS "vt_external_fmt = ON but neither fmt_DIR nor fmt_ROOT is provided!")
3032
endif()
3133
find_package(fmt 7.1.0 REQUIRED)
3234

cmake/vtConfig.cmake.in

+5
Original file line numberDiff line numberDiff line change
@@ -26,4 +26,9 @@ endif()
2626
set (VT_INCLUDE_DIRS "@CMAKE_INSTALL_PREFIX@/include")
2727
set (VT_CXX_COMPILER "@CMAKE_CXX_COMPILER@")
2828

29+
if (@vt_external_fmt@)
30+
set (fmt_DIR @fmt_DIR@)
31+
find_dependency(fmt REQUIRED HINTS @fmt_DIR@)
32+
endif()
33+
2934
set(VT_HAS_FMT "TRUE")

0 commit comments

Comments
 (0)