function ( GetAllSubDir result currdir )
    file( GLOB children RELATIVE ${currdir} ${currdir}/*)
    set( dirlist "")
    foreach( child ${children} )
        message( STATUS "The child is ${child}" )
        if( IS_DIRECTORY ${currdir}/${child} )
            list( APPEND dirlist ${child} )
        endif()
    endforeach()
    set( ${result} ${dirlist} PARENT_SCOPE )
endfunction()

function ( set_source_group HEAD_LIST SRC_LIST )
    foreach( dir ${dirList} )
        message( STATUS " The dir is ${dir} " )
        file(GLOB headerFile "${dir}/include/*.h" )
        file(GLOB srcFile "${dir}/src/*.cpp" )
        file(GLOB hppFile "${dir}/src/*.hpp" )
        include_directories("${CMAKE_CURRENT_SOURCE_DIR}/${dir}/include")
        if( NOT( hppFile STREQUAL "" ) )
            include_directories("${CMAKE_CURRENT_SOURCE_DIR}/${dir}/src")
        endif()

        message( STATUS "The headerFile is ${headerFile}" )
        message( STATUS "The srcFile is ${srcFile}" )
    
        source_group("${dir}\\include" FILES ${headerFile})
        source_group("${dir}\\src" FILES ${srcFile})
        list( APPEND HEAD_LIST ${headerFile} )
        list( APPEND SRC_LIST  ${srcFile} )
    endforeach()
    set( ${HEAD_LIST} PARENT_SCOPE )
    set( ${SRC_LIST} PARENT_SCOPE )
endfunction()