# list subdirectories
macro(SUBDIRLIST OUTPUT CURDIR)
    file(GLOB CHILDREN RELATIVE "${CURDIR}" "${CURDIR}/*")
    set(DIRLIST "")
    foreach(CHILD ${CHILDREN})
        if(IS_DIRECTORY "${CURDIR}/${CHILD}")
            list(APPEND DIRLIST ${CHILD})
        endif()
    endforeach()
    set(${OUTPUT} ${DIRLIST})
endmacro(SUBDIRLIST)
