Use optional pattern argument to search under subdirs
[staging/xdg-launcher.git] / reference / etc / macros.cmake
index 046be7a..a002d95 100644 (file)
@@ -112,7 +112,12 @@ macro(project_package_build)
 endmacro(project_package_build)
 
 macro(project_subdirs_add)
-       file(GLOB filelist "*")
+       if(${ARGV0})
+               file(GLOB filelist "${ARGV0}")
+       else()
+               file(GLOB filelist "*")
+       endif(${ARGV0})
+
        foreach(filename ${filelist})
                if(EXISTS "${filename}/CMakeLists.txt")
                        add_subdirectory(${filename})