macro(IK_AddAllSubDir)
    file(GLOB children RELATIVE ${CMAKE_CURRENT_SOURCE_DIR} ${CMAKE_CURRENT_SOURCE_DIR}/*)
    set(dirlist "")
    foreach(child ${children})
        if(IS_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR}/${child})
            if(${child} STREQUAL "CMakeFiles")
            else(${child})
                LIST(APPEND dirlist ${child})
            endif()
        endif()
    endforeach()
    foreach(subdir ${dirlist})
        add_subdirectory(${subdir})
    endforeach()
endmacro(IK_AddAllSubDir)
#---------------------------------------
macro(IK_GetDirName DIRNAME)
    string(REGEX MATCH "([^/]*)$" TMP ${CMAKE_CURRENT_SOURCE_DIR})
    set(${DIRNAME} ${TMP})
endmacro(IK_GetDirName DIRNAME)
