From: Jakub Jirutka Date: Sat, 11 Dec 2021 12:00:39 +0100 Subject: [PATCH] Fix install directory for cmake files diff --git a/CMakeLists.txt b/CMakeLists.txt index 87de541..8e4fe8a 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -78,7 +78,7 @@ if(IS_TOP_PROJECT) "${PROJECT_SOURCE_DIR}/cmake/${PROJECT_NAME}Config.cmake.in" "${PROJECT_BINARY_DIR}/${PROJECT_NAME}Config.cmake" INSTALL_DESTINATION - ${CMAKE_INSTALL_DATAROOTDIR}/${PROJECT_NAME}/cmake) + ${CMAKE_INSTALL_LIBDIR}/cmake/${PROJECT_NAME}/) # Install the previously generated "config" and "version" files install( @@ -86,7 +86,7 @@ if(IS_TOP_PROJECT) "${PROJECT_BINARY_DIR}/${PROJECT_NAME}Config.cmake" "${PROJECT_BINARY_DIR}/${PROJECT_NAME}ConfigVersion.cmake" DESTINATION - ${CMAKE_INSTALL_DATAROOTDIR}/${PROJECT_NAME}/cmake) + ${CMAKE_INSTALL_LIBDIR}/cmake/${PROJECT_NAME}/) # Install the entire local `elfio` directory to the include directory install( @@ -107,7 +107,7 @@ if(IS_TOP_PROJECT) NAMESPACE ${PROJECT_NAME}:: DESTINATION - ${CMAKE_INSTALL_DATAROOTDIR}/${PROJECT_NAME}/cmake) + ${CMAKE_INSTALL_LIBDIR}/cmake/${PROJECT_NAME}/) # Add the elfio target to the ${PROJECT_NAME}_Targets export install(