summaryrefslogtreecommitdiffstats
path: root/cmake/common.cmake
diff options
context:
space:
mode:
authorRomain Forlot <romain.forlot@iot.bzh>2017-08-18 20:22:06 +0200
committerRomain Forlot <romain.forlot@iot.bzh>2018-10-15 18:22:47 +0200
commit6e9f005abf1b99b4439952ac5a92b2404cc6b401 (patch)
tree4622fa0eb0f6e7784e0e235a392cf51dfff3da9f /cmake/common.cmake
parentb91e28ac6c48efb5894c69c989f68331cc2433f2 (diff)
Better OS detection and inclusion per distribution
Change-Id: I6f479353df990eb2ff9030b7427d48bb72f0416f Signed-off-by: Romain Forlot <romain.forlot@iot.bzh>
Diffstat (limited to 'cmake/common.cmake')
-rw-r--r--cmake/common.cmake12
1 files changed, 10 insertions, 2 deletions
diff --git a/cmake/common.cmake b/cmake/common.cmake
index ed13ccc..06d04c6 100644
--- a/cmake/common.cmake
+++ b/cmake/common.cmake
@@ -26,9 +26,9 @@
file(GLOB project_cmakefiles ${PROJECT_APP_TEMPLATES_DIR}/cmake/cmake.d/[0-9][0-9]-*.cmake)
list(SORT project_cmakefiles)
-file(GLOB home_cmakefiles $ENV{HOME}/.config/app-templates/cmake.d/[0-9][0-9]-common-*.cmake $ENV{HOME}/.config/app-templates/cmake.d/[0-9][0-9]-${PROJECT_NAME}-*.cmake)
+file(GLOB home_cmakefiles $ENV{HOME}/.config/app-templates/cmake.d/[0-9][0-9]-common*.cmake $ENV{HOME}/.config/app-templates/cmake.d/[0-9][0-9]-${PROJECT_NAME}*.cmake)
list(SORT home_cmakefiles)
-file(GLOB system_cmakefiles /etc/app-templates/cmake.d/[0-9][0-9]-common-*.cmake /etc/app-templates/cmake.d/[0-9][0-9]-${PROJECT_NAME}-*.cmake)
+file(GLOB system_cmakefiles /etc/app-templates/cmake.d/[0-9][0-9]-common*.cmake /etc/app-templates/cmake.d/[0-9][0-9]-${PROJECT_NAME}*.cmake)
list(SORT system_cmakefiles)
foreach(file ${system_cmakefiles} ${home_cmakefiles} ${project_cmakefiles})
@@ -36,6 +36,14 @@ foreach(file ${system_cmakefiles} ${home_cmakefiles} ${project_cmakefiles})
include(${file})
endforeach()
+message(STATUS "${ENTRY_POINT}/cmake/[0-9][0-9]-${OSRELEASE}*.cmake")
+file(GLOB project_cmakefiles ${ENTRY_POINT}/cmake/[0-9][0-9]-common*.cmake ${ENTRY_POINT}/cmake/[0-9][0-9]-${OSRELEASE}*.cmake )
+list(SORT project_cmakefiles)
+foreach(file ${project_cmakefiles})
+ message(STATUS "Include: ${file}")
+ include(${file})
+endforeach()
+
if(DEFINED PROJECT_SRC_DIR_PATTERN)
project_subdirs_add(${PROJECT_SRC_DIR_PATTERN})
else()