def determine_windows_extra_paths(
            self, target: T.Union[build.BuildTarget, build.CustomTarget, build.CustomTargetIndex, programs.ExternalProgram, mesonlib.File, str],
            extra_bdeps: T.Sequence[T.Union[build.BuildTarget, build.CustomTarget, build.CustomTargetIndex]]) -> T.List[str]:
        """On Windows there is no such thing as an rpath.

        We must determine all locations of DLLs that this exe
        links to and return them so they can be used in unit
        tests.
        """
        prospectives: T.Set[build.BuildTargetTypes] = set()
        internal_deps: T.Set[str] = set()
        external_deps: T.Set[str] = set()

        if isinstance(target, build.BuildTarget):
            prospectives.update(target.get_all_link_deps())

        for bdep in extra_bdeps:
            prospectives.add(bdep)
            if isinstance(bdep, build.BuildTarget):
                prospectives.update(bdep.get_all_link_deps())

        # Internal deps
        for ld in prospectives:
            dirseg = os.path.join(self.environment.get_build_dir(), self.get_target_dir(ld))
            internal_deps.add(dirseg)

        if isinstance(target, build.BuildTarget):
            # External deps
            external_deps.update(self.extract_dll_paths(target))

            if not self.environment.machines.matches_build_machine(target.for_machine):
                external_deps.update(self.get_mingw_extra_paths(target))

        return list(internal_deps) + list(external_deps)
On Windows there is no such thing as an rpath.

        We must determine all locations of DLLs that this exe
        links to and return them so they can be used in unit
        tests.
        
mesonbuild/backend/backends.py