Adding cmake file at the root directory
authorRomain Forlot <romain.forlot@iot.bzh>
Fri, 20 Apr 2018 13:17:49 +0000 (15:17 +0200)
committerRomain Forlot <romain.forlot@iot.bzh>
Fri, 20 Apr 2018 13:17:49 +0000 (15:17 +0200)
It may be needed to include additionnal files from the root dir
as populate and remote_target_populate targets are created
at inclusion parts you can't adds target using app-template
macros after the config.cmake first inclusion.

Change-Id: I92a98d997aa239ab56183da8dc95f6db993c17a2
Signed-off-by: Romain Forlot <romain.forlot@iot.bzh>
cmake/cmake.d/03-macros.cmake

index 61fc0dc..c189bd6 100644 (file)
@@ -520,6 +520,8 @@ macro(project_subdirs_add)
        foreach(filename ${filelist})
                if(EXISTS "${filename}/CMakeLists.txt")
                        add_subdirectory(${filename})
+               elseif(${filename} MATCHES "^.*cmake$")
+                       include(${filename})
                endif(EXISTS "${filename}/CMakeLists.txt")
        endforeach()
 endmacro(project_subdirs_add)