macro(subdirectories_list RESULT CUR_DIR)
    file(GLOB children RELATIVE ${CUR_DIR} ${CUR_DIR}/*)
    set(dirlist "")
    FOREACH(child ${children})
        IF(IS_DIRECTORY ${CUR_DIR}/${child})
            list(APPEND dirlist ${child})
        ENDIF()
    ENDFOREACH()
    set(${RESULT} ${dirlist})
endmacro()
