diff --git a/mesonbuild/backend/xcodebackend.py b/mesonbuild/backend/xcodebackend.py index 590b24f06..3bfadd7e7 100644 --- a/mesonbuild/backend/xcodebackend.py +++ b/mesonbuild/backend/xcodebackend.py @@ -255,6 +255,13 @@ class XCodeBackend(backends.Backend): obj_path = f'{project}.build/{buildtype}/{tname}.build/Objects-normal/{arch}/{stem}.o' return obj_path + def determine_swift_dep_dirs(self, target): + result: T.List[str] = [] + for l in target.link_targets: + # Xcode does not recognize our private directories, so we have to use its build directories instead. + result.append(os.path.join(self.environment.get_build_dir(), self.get_target_dir(l))) + return result + def generate(self, capture: bool = False, vslite_ctx: dict = None) -> T.Optional[dict]: # Check for (currently) unexpected capture arg use cases - if capture: