function(ariles_parse_test_dependencies DEPENDENCIES LINK_TO_LIBRARIES TGT_DEPENDS TGT_INCLUDES)
    set(MISSING_DEPENDENCY OFF)

    foreach(DEPENDENCY ${DEPENDENCIES})
        list (FIND ARILES_VISITORS "${DEPENDENCY}" INDEX)

        if (${INDEX} GREATER -1)
            if (ARILES_VISITOR_${DEPENDENCY})
                list(APPEND TGT_DEPENDS "${VISITOR_TARGET_PREFIX}_${DEPENDENCY}")
                list(APPEND LINK_TO_LIBRARIES "${ARILES_VISITOR_${DEPENDENCY}_LIBS}")

                get_property(DEPENDENCY_INCLUDES TARGET ${VISITOR_TARGET_PREFIX}_${DEPENDENCY} PROPERTY INTERFACE_INCLUDE_DIRECTORIES)
                if (DEPENDENCY_INCLUDES)
                    list(APPEND TGT_INCLUDES "${DEPENDENCY_INCLUDES}")
                endif()
            else()
                set(MISSING_DEPENDENCY ON)
            endif()
        else()
            string(COMPARE NOTEQUAL "${DEPENDENCY}" "DIFF_WITH_REFERENCE" COMPARE_RESULT)
            if (COMPARE_RESULT)
                set(MISSING_DEPENDENCY ON)
            endif(COMPARE_RESULT)
        endif()
    endforeach(DEPENDENCY)


    set(LINK_TO_LIBRARIES   "${LINK_TO_LIBRARIES}"  PARENT_SCOPE)
    set(TGT_DEPENDS         "${TGT_DEPENDS}"        PARENT_SCOPE)
    set(TGT_INCLUDES        "${TGT_INCLUDES}"       PARENT_SCOPE)
    set(MISSING_DEPENDENCY  "${MISSING_DEPENDENCY}" PARENT_SCOPE)
endfunction()
