mirror of
https://github.com/fmtlib/fmt.git
synced 2024-11-10 13:10:07 +00:00
Merge pull request #299 from niosHD/minor-packaging-improvements
Minor packaging improvements
This commit is contained in:
commit
d8e246daaf
@ -93,7 +93,7 @@ if (MASTER_PROJECT AND EXISTS ${gitignore})
|
|||||||
string(REPLACE "*" ".*" line "${line}")
|
string(REPLACE "*" ".*" line "${line}")
|
||||||
set(ignored_files ${ignored_files} "${line}$" "${line}/")
|
set(ignored_files ${ignored_files} "${line}$" "${line}/")
|
||||||
endforeach ()
|
endforeach ()
|
||||||
set(ignored_files ${ignored_files}
|
set(ignored_files ${ignored_files} ${PROJECT_BINARY_DIR}
|
||||||
/.git /breathe /format-benchmark sphinx/ .buildinfo .doctrees)
|
/.git /breathe /format-benchmark sphinx/ .buildinfo .doctrees)
|
||||||
|
|
||||||
set(CPACK_SOURCE_GENERATOR ZIP)
|
set(CPACK_SOURCE_GENERATOR ZIP)
|
||||||
|
@ -45,7 +45,8 @@ endif ()
|
|||||||
# Install targets.
|
# Install targets.
|
||||||
if (FMT_INSTALL)
|
if (FMT_INSTALL)
|
||||||
include(CMakePackageConfigHelpers)
|
include(CMakePackageConfigHelpers)
|
||||||
set(config_install_dir lib/cmake/cppformat)
|
set(FMT_CMAKE_DIR lib/cmake/cppformat CACHE STRING
|
||||||
|
"Installation directory for cmake files, relative to ${CMAKE_INSTALL_PREFIX}.")
|
||||||
set(version_config ${PROJECT_BINARY_DIR}/cppformat-config-version.cmake)
|
set(version_config ${PROJECT_BINARY_DIR}/cppformat-config-version.cmake)
|
||||||
set(project_config ${PROJECT_BINARY_DIR}/cppformat-config.cmake)
|
set(project_config ${PROJECT_BINARY_DIR}/cppformat-config.cmake)
|
||||||
set(targets_export_name cppformat-targets)
|
set(targets_export_name cppformat-targets)
|
||||||
@ -66,14 +67,14 @@ if (FMT_INSTALL)
|
|||||||
configure_package_config_file(
|
configure_package_config_file(
|
||||||
${PROJECT_SOURCE_DIR}/support/cmake/cppformat-config.cmake.in
|
${PROJECT_SOURCE_DIR}/support/cmake/cppformat-config.cmake.in
|
||||||
${project_config}
|
${project_config}
|
||||||
INSTALL_DESTINATION ${config_install_dir})
|
INSTALL_DESTINATION ${FMT_CMAKE_DIR})
|
||||||
export(TARGETS ${INSTALL_TARGETS} FILE ${PROJECT_BINARY_DIR}/${targets_export_name}.cmake)
|
export(TARGETS ${INSTALL_TARGETS} FILE ${PROJECT_BINARY_DIR}/${targets_export_name}.cmake)
|
||||||
|
|
||||||
# Install version, config and target files.
|
# Install version, config and target files.
|
||||||
install(
|
install(
|
||||||
FILES ${project_config} ${version_config}
|
FILES ${project_config} ${version_config}
|
||||||
DESTINATION ${config_install_dir})
|
DESTINATION ${FMT_CMAKE_DIR})
|
||||||
install(EXPORT ${targets_export_name} DESTINATION ${config_install_dir})
|
install(EXPORT ${targets_export_name} DESTINATION ${FMT_CMAKE_DIR})
|
||||||
|
|
||||||
# Install the library and headers.
|
# Install the library and headers.
|
||||||
install(TARGETS ${INSTALL_TARGETS} EXPORT ${targets_export_name} DESTINATION ${FMT_LIB_DIR})
|
install(TARGETS ${INSTALL_TARGETS} EXPORT ${targets_export_name} DESTINATION ${FMT_LIB_DIR})
|
||||||
|
Loading…
Reference in New Issue
Block a user