summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRomain Forlot <romain.forlot@iot.bzh>2017-08-23 17:14:45 +0200
committerRomain Forlot <romain.forlot@iot.bzh>2017-08-23 17:14:45 +0200
commit367dde614dafebf976d24bcc6c0f18d8ed7348c7 (patch)
treed560e7327e90fa8a1b95ec29717c413a3e4a065d
parent08aec90d5db29a723d7b083910ba8b0be6faeb07 (diff)
OS detection to fallback instead of addition
Instead of include a default cmake file in addition of the others, use it as fallback if any other cmake file doesn't match Change-Id: Ib46e0e64a5f485dcad4e41f092936484da83b7f4 Signed-off-by: Romain Forlot <romain.forlot@iot.bzh>
-rw-r--r--cmake/common.cmake6
1 files changed, 5 insertions, 1 deletions
diff --git a/cmake/common.cmake b/cmake/common.cmake
index 1a7a2f0..5e107ac 100644
--- a/cmake/common.cmake
+++ b/cmake/common.cmake
@@ -36,8 +36,12 @@ foreach(file ${system_cmakefiles} ${home_cmakefiles} ${project_cmakefiles})
include(${file})
endforeach()
-file(GLOB project_cmakefiles ${ENTRY_POINT}/cmake/[0-9][0-9]-common*.cmake ${ENTRY_POINT}/cmake/[0-9][0-9]-${OSRELEASE}*.cmake )
+file(GLOB project_cmakefiles ${ENTRY_POINT}/cmake/[0-9][0-9]-${OSRELEASE}*.cmake )
list(SORT project_cmakefiles)
+if(NOT ${project_cmakefiles})
+ file(GLOB project_cmakefiles ${ENTRY_POINT}/cmake/[0-9][0-9]-default*.cmake)
+endif()
+
foreach(file ${project_cmakefiles})
message(STATUS "Include: ${file}")
include(${file})