summaryrefslogtreecommitdiffstats
path: root/CMakeLists.txt
diff options
context:
space:
mode:
authorRomain Forlot <romain.forlot@iot.bzh>2018-11-02 10:25:01 +0100
committerRomain Forlot <romain.forlot@iot.bzh>2018-11-02 11:28:36 +0100
commit8c250308bce289b25007502d6be5c4a0e13d6159 (patch)
tree80a3e9b5e6f85e46cdc36ea7f938ace8ad80425e /CMakeLists.txt
parent28dc5cc12f14c7163e655b57c4e2af28302622f6 (diff)
Install the module in the system cmake path
Change-Id: Ib9a826842d9ce88e27eb564fd9fee9725c161ed2 Signed-off-by: Romain Forlot <romain.forlot@iot.bzh>
Diffstat (limited to 'CMakeLists.txt')
-rw-r--r--CMakeLists.txt12
1 files changed, 3 insertions, 9 deletions
diff --git a/CMakeLists.txt b/CMakeLists.txt
index 0034977..8449464 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -20,12 +20,6 @@ cmake_minimum_required(VERSION 3.6)
include(GNUInstallDirs)
-if(DEFINED ENV{PKG_CONFIG_SYSROOT_DIR})
- set(CMAKE_DATADIR "cmake-${CMAKE_MAJOR_VERSION}.${CMAKE_MINOR_VERSION}")
-else()
- set(CMAKE_DATADIR "cmake")
-endif()
-
-INSTALL(FILES CMakeAfbTemplates.cmake DESTINATION ${CMAKE_INSTALL_DATAROOTDIR}/${CMAKE_DATADIR}/Modules)
-INSTALL(DIRECTORY ${CMAKE_SOURCE_DIR}/ DESTINATION ${CMAKE_INSTALL_DATAROOTDIR}/${CMAKE_DATADIR}/Modules/CMakeAfbTemplates
- REGEX "(CMakeAfbTemplates.cmake|gendocs.sh|book.json|CMakeLists.txt|docs|.*\/\.git.*)" EXCLUDE)
+INSTALL(FILES CMakeAfbTemplates.cmake DESTINATION ${CMAKE_ROOT}/Modules)
+INSTALL(DIRECTORY ${CMAKE_SOURCE_DIR}/ DESTINATION ${CMAKE_ROOT}/Modules/CMakeAfbTemplates
+ REGEX "(CMakeAfbTemplates.cmake|gendocs.sh|book.json|CMakeLists.txt|docs|build|.*\/\.git.*)" EXCLUDE)