def METHOD_NAME(self, pkg, spec, prefix):
    mkdirp(prefix.lib)
    libs_to_install = glob.glob(
        os.path.join(self.build_directory, "**", "*.lib"), recursive=True
    )
    if self.pkg.spec.satisfies("~static"):
        libs_to_install.extend(
            glob.glob(os.path.join(self.build_directory, "**", "*.dll"), recursive=True)
        )
    for library in libs_to_install:
        METHOD_NAME(library, prefix.lib)
    rename(
        os.path.join(prefix.lib, "libtheora_static.lib"),
        os.path.join(prefix.lib, "theora.lib"),
    )
    # The encoder and decoder libs are baked into the theora lib on Windows, so we spoof them
    # here so libtheora is detectable by CMake and pkg-config and linkable by
    # consuming projects
    with working_dir(prefix.lib):
        copy("theora.lib", "theoradec.lib")
        copy("theora.lib", "theoraenc.lib")
    with working_dir(pkg.stage.source_path):
        install_tree("include", prefix.include)