Skip to content

Commit

Permalink
Merge pull request #412 from clintonstimpson/tpl-findfmt
Browse files Browse the repository at this point in the history
Find fmt TPL using modern cmake files.
  • Loading branch information
gsjaardema authored Oct 16, 2023
2 parents 73cfb81 + 2d63a28 commit ca899da
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 ca899da

Please sign in to comment.