From afdc039c930ec456440014f5d37532c008adac32 Mon Sep 17 00:00:00 2001 From: Nick Kiesel Date: Thu, 26 May 2022 21:11:17 -0500 Subject: [PATCH] Skip cmake targets inclusion if fmt::fmt already exists --- 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)