Move export() directive outside of FMT_INSTALL scope

Closes #4806
This commit is contained in:
RealSteel99-codes 2026-06-26 10:03:16 -05:00 committed by Victor Zverovich
parent 6dac6cad05
commit ee0d40e714

View File

@ -506,10 +506,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(
@ -528,6 +525,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")