macro( subdirectories result curdir )
  file( GLOB children RELATIVE ${curdir} ${curdir}/* )
  set( directories "")
  foreach( child ${children} )
    if( IS_DIRECTORY ${curdir}/${child} )
      list( APPEND directories ${child} )
    endif()
  endforeach()
  set( ${result} ${directories} )
endmacro()
