diff options
-rw-r--r-- | cmake/common.cmake | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/cmake/common.cmake b/cmake/common.cmake index a78d246..9904692 100644 --- a/cmake/common.cmake +++ b/cmake/common.cmake @@ -253,11 +253,13 @@ macro(project_package_build) endmacro(project_package_build) macro(project_subdirs_add) - if(${ARGV0}) + set (ARGSLIST ${ARGN}) + list(LENGTH ARGSLIST ARGSNUM) + if(${ARGSNUM} GREATER 0) file(GLOB filelist "${ARGV0}") else() - file(GLOB filelist "*") - endif(${ARGV0}) + file(GLOB filelist "*") + endif() foreach(filename ${filelist}) if(EXISTS "${filename}/CMakeLists.txt") |