From 0371080ac6e33ce681e1846eece9ef192520da7b Mon Sep 17 00:00:00 2001 From: RealSteel99-codes Date: Fri, 26 Jun 2026 10:03:16 -0500 Subject: [PATCH] Move export() directive outside of FMT_INSTALL scope Closes #4806 --- CMakeLists.txt | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index 1de95cc45842..7d930751bab1 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -504,10 +504,7 @@ if (FMT_INSTALL) # Use a namespace because CMake provides better diagnostics for namespaced # imported targets. - export( - TARGETS ${INSTALL_TARGETS} - NAMESPACE fmt:: - FILE ${PROJECT_BINARY_DIR}/${targets_export_name}.cmake) + # Install version, config and target files. install( @@ -526,6 +523,11 @@ if (FMT_INSTALL) COMPONENT fmt_core) endif () + export( + TARGETS ${INSTALL_TARGETS} + NAMESPACE fmt:: + FILE ${PROJECT_BINARY_DIR}/${targets_export_name}.cmake) + function (add_doc_target) find_program(DOXYGEN doxygen PATHS "$ENV{ProgramFiles}/doxygen/bin" "$ENV{ProgramFiles\(x86\)}/doxygen/bin")