First commit
This commit is contained in:
@@ -1,8 +1,25 @@
|
||||
macro(SubDirList curdir result)
|
||||
file(GLOB children RELATIVE ${curdir} ${curdir}/*)
|
||||
|
||||
foreach(child ${children})
|
||||
if(IS_DIRECTORY ${curdir}/${child})
|
||||
list(APPEND ${result} ${child})
|
||||
endif()
|
||||
endforeach()
|
||||
endmacro()
|
||||
|
||||
macro(SubDirListRecurse curdir basedir result)
|
||||
file(GLOB children RELATIVE ${curdir} ${curdir}/*)
|
||||
|
||||
foreach(child ${children})
|
||||
if(IS_DIRECTORY ${curdir}/${child})
|
||||
if(${child} STREQUAL ${basedir})
|
||||
list(APPEND ${result} ${child})
|
||||
else()
|
||||
file(RELATIVE_PATH relpath ${basedir} ${curdir}/${child})
|
||||
list(APPEND ${result} ${relpath})
|
||||
SubDirListRecurse(${curdir}/${child} ${basedir} ${result})
|
||||
endif()
|
||||
endif()
|
||||
endforeach()
|
||||
endmacro()
|
||||
|
||||
Reference in New Issue
Block a user