CMake imported targets should be namespaced

This commit is contained in:
Bjoern Thiel 2017-05-19 09:52:27 +02:00
parent 07ed421521
commit b9b5f41e04

View File

@ -84,7 +84,8 @@ if (FMT_INSTALL)
install( install(
FILES ${project_config} ${version_config} FILES ${project_config} ${version_config}
DESTINATION ${FMT_CMAKE_DIR}) DESTINATION ${FMT_CMAKE_DIR})
install(EXPORT ${targets_export_name} DESTINATION ${FMT_CMAKE_DIR}) install(EXPORT ${targets_export_name} DESTINATION ${FMT_CMAKE_DIR}
NAMESPACE Fmt::)
# Install the library and headers. # Install the library and headers.
install(TARGETS ${INSTALL_TARGETS} EXPORT ${targets_export_name} install(TARGETS ${INSTALL_TARGETS} EXPORT ${targets_export_name}