Skip to content

Commit

Permalink
Find fmt TPL using modern cmake files.
Browse files Browse the repository at this point in the history
  • Loading branch information
clintonstimpson committed Oct 16, 2023
1 parent 73cfb81 commit 2d63a28
Showing 1 changed file with 11 additions and 4 deletions.
15 changes: 11 additions & 4 deletions cmake/TPLs/FindTPLfmt.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -53,8 +53,15 @@
# ************************************************************************
# @HEADER

message("-- Using find_package(fmt CONFIG) ...")
find_package(fmt CONFIG)
if (fmt_FOUND)
message("-- Found fmt_CONFIG=${fmt_CONFIG}")
message("-- Generating fmt::all_libs and fmtConfig.cmake")
tribits_extpkg_create_imported_all_libs_target_and_config_file(
fmt
INNER_FIND_PACKAGE_NAME fmt
IMPORTED_TARGETS_FOR_ALL_LIBS fmt::fmt)
set(TPL_fmt_NOT_FOUND FALSE)
endif()

TRIBITS_TPL_FIND_INCLUDE_DIRS_AND_LIBRARIES( fmt
REQUIRED_HEADERS fmt/format.h
REQUIRED_LIBS_NAMES fmt
)

0 comments on commit 2d63a28

Please sign in to comment.