diff --git a/CMakeLists.txt b/CMakeLists.txt index 120dd38d..177fa298 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -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