From 90b68783fff695d6ad26a56550272edd43c57b44 Mon Sep 17 00:00:00 2001 From: Nick Kiesel Date: Fri, 27 May 2022 10:35:40 -0500 Subject: [PATCH] Skip cmake targets inclusion if fmt::fmt already exists (#2907) --- support/cmake/fmt-config.cmake.in | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/support/cmake/fmt-config.cmake.in b/support/cmake/fmt-config.cmake.in index 71e30286..bc1684f2 100644 --- a/support/cmake/fmt-config.cmake.in +++ b/support/cmake/fmt-config.cmake.in @@ -1,4 +1,7 @@ @PACKAGE_INIT@ -include(${CMAKE_CURRENT_LIST_DIR}/@targets_export_name@.cmake) +if (NOT TARGET fmt::fmt) + include(${CMAKE_CURRENT_LIST_DIR}/@targets_export_name@.cmake) +endif () + check_required_components(fmt)