@staticmethod
def write_target_references(context, cmake_file):
    """
        Write target references on given CMakeLists.txt file

        :param context: current context
        :type context: Context
        :param cmake_file: CMakeLists.txt IO wrapper
        :type cmake_file: _io.TextIOWrapper
        """
    deps_to_write = []
    targets_dependencies_set = set()
    for reference in context.target_references:
        targets_dependencies_set.add(reference)
        deps_to_write.append(reference)
    for sln_dep in context.sln_deps:
        if sln_dep not in targets_dependencies_set:
            targets_dependencies_set.add(sln_dep)
            deps_to_write.append(sln_dep)
    if deps_to_write:
        cmake_file.write('add_dependencies(${PROJECT_NAME}\n')
        for dep in deps_to_write:
            cmake_file.write('    {}\n'.format(dep))
        cmake_file.write(')\n\n')
