diff options
-rw-r--r-- | CMakeLists.txt | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/CMakeLists.txt b/CMakeLists.txt index cd1eb5d..ebc3824 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -20,5 +20,7 @@ cmake_minimum_required(VERSION 3.5) include(GNUInstallDirs) -INSTALL(FILES CMakeAfbTemplates.cmake DESTINATION ${CMAKE_ROOT}/Modules) -INSTALL(DIRECTORY ${CMAKE_SOURCE_DIR}/src/ DESTINATION ${CMAKE_ROOT}/Modules/CMakeAfbTemplates) +get_filename_component(CMAKE_DIR ${CMAKE_ROOT} NAME) + +INSTALL(FILES CMakeAfbTemplates.cmake DESTINATION ${CMAKE_INSTALL_DATADIR}/${CMAKE_DIR}/Modules) +INSTALL(DIRECTORY ${CMAKE_SOURCE_DIR}/src/ DESTINATION ${CMAKE_INSTALL_DATADIR}/${CMAKE_DIR}/Modules/CMakeAfbTemplates) |