This commit is contained in:
Bjoern Thiel 2017-05-20 05:19:30 +00:00 committed by GitHub
commit 6b9c681353
2 changed files with 4 additions and 3 deletions

View File

@ -77,14 +77,15 @@ if (FMT_INSTALL)
${PROJECT_SOURCE_DIR}/support/cmake/fmt-config.cmake.in
${project_config}
INSTALL_DESTINATION ${FMT_CMAKE_DIR})
export(TARGETS ${INSTALL_TARGETS}
export(TARGETS ${INSTALL_TARGETS} NAMESPACE Fmt::
FILE ${PROJECT_BINARY_DIR}/${targets_export_name}.cmake)
# Install version, config and target files.
install(
FILES ${project_config} ${version_config}
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(TARGETS ${INSTALL_TARGETS} EXPORT ${targets_export_name}

View File

@ -5,7 +5,7 @@ project(fmt-test)
find_package(FMT REQUIRED)
add_executable(library-test main.cc)
target_link_libraries(library-test fmt)
target_link_libraries(library-test Fmt::fmt)
if (TARGET fmt-header-only)
add_executable(header-only-test main.cc)