cmake: Use DATAROOTDIR for pkg-config and cmake files.

These files do not have any architecture independent data and
only headers are installed so it is better to use architecture
independent install paths like /usr/share.
pull/1192/head
orbea 6 years ago
parent 3adfeeec3e
commit 50cbc69b57

@ -160,13 +160,13 @@ if (SPDLOG_INSTALL)
set(project_config_out "${CMAKE_CURRENT_BINARY_DIR}/spdlogConfig.cmake")
set(config_targets_file "spdlogConfigTargets.cmake")
set(version_config_file "${CMAKE_CURRENT_BINARY_DIR}/spdlogConfigVersion.cmake")
set(export_dest_dir "${CMAKE_INSTALL_LIBDIR}/spdlog/cmake")
set(export_dest_dir "${CMAKE_INSTALL_DATAROOTDIR}/spdlog/cmake")
#---------------------------------------------------------------------------------------
# Include files
#---------------------------------------------------------------------------------------
install(DIRECTORY include/ DESTINATION "${CMAKE_INSTALL_INCLUDEDIR}")
install(TARGETS spdlog spdlog_header_only EXPORT spdlog DESTINATION "${CMAKE_INSTALL_LIBDIR}/spdlog")
install(TARGETS spdlog spdlog_header_only EXPORT spdlog DESTINATION "${CMAKE_INSTALL_DATAROOTDIR}/spdlog")
#---------------------------------------------------------------------------------------
# Package and version files

Loading…
Cancel
Save