diff options
author | Romain Forlot <romain.forlot@iot.bzh> | 2018-11-13 16:29:45 +0100 |
---|---|---|
committer | Romain Forlot <romain.forlot@iot.bzh> | 2018-11-13 16:33:23 +0100 |
commit | 742695d0946e0bf755204a5503603fd5285aa770 (patch) | |
tree | e24133224a7834cbb957bf3007b2812f1bbdc2c1 | |
parent | 81bd8f3ace3b99d1d60344cab04205d531efa0f4 (diff) |
Fix crosscompile installationsandbox/claneys/module
Using CMAKE_ROOT doesn't point to the correct path when using a cross-compilation
environment since the cmake installation directory isn't located in the same sysroot
than the targeted system.
Change-Id: If3f877c579123c5dd0b23a762c08d97755817442
Signed-off-by: Romain Forlot <romain.forlot@iot.bzh>
-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) |