Install cmake files to share/

Because this is header-only library, there is no .a/.so which is
arch-dependent.
This commit is contained in:
Alexey Sokolov 2022-09-25 22:18:11 +01:00 committed by The Phantom Derpstorm
parent 8173d26557
commit e5348c29f1

View File

@ -105,7 +105,7 @@ target_include_directories(sol2 ${sol2-system-include}
configure_package_config_file(
cmake/sol2-config.cmake.in
"${CMAKE_CURRENT_BINARY_DIR}/cmake/sol2-config.cmake"
INSTALL_DESTINATION lib/cmake/sol2
INSTALL_DESTINATION ${CMAKE_INSTALL_DATADIR}/cmake/sol2
NO_CHECK_REQUIRED_COMPONENTS_MACRO)
write_basic_package_version_file(
@ -121,7 +121,7 @@ if(SOL2_ENABLE_INSTALL)
install(EXPORT sol2
FILE sol2-targets.cmake
DESTINATION "${CMAKE_INSTALL_LIBDIR}/cmake/sol2")
DESTINATION "${CMAKE_INSTALL_DATADIR}/cmake/sol2")
install(DIRECTORY include/sol
DESTINATION "${CMAKE_INSTALL_INCLUDEDIR}")
@ -129,7 +129,7 @@ if(SOL2_ENABLE_INSTALL)
install(FILES
"${CMAKE_CURRENT_BINARY_DIR}/cmake/sol2-config.cmake"
"${CMAKE_CURRENT_BINARY_DIR}/cmake/sol2-config-version.cmake"
DESTINATION "${CMAKE_INSTALL_LIBDIR}/cmake/sol2")
DESTINATION "${CMAKE_INSTALL_DATADIR}/cmake/sol2")
endif()
# # # sol2 Library - Single header target