diff options
author | Jussi Pakkanen <jpakkane@gmail.com> | 2021-04-17 20:08:07 +0300 |
---|---|---|
committer | Jussi Pakkanen <jpakkane@gmail.com> | 2021-04-18 19:19:29 +0300 |
commit | e422e9c634997313350a5dc3136980cac2567043 (patch) | |
tree | 2dfb1f8915b7bfd3a306196ffb9f302f81e3b2f4 /mesonbuild | |
parent | 126db6de129cf04b64b7b9a1f4486f7171d26ad0 (diff) | |
download | meson-e422e9c634997313350a5dc3136980cac2567043.zip meson-e422e9c634997313350a5dc3136980cac2567043.tar.gz meson-e422e9c634997313350a5dc3136980cac2567043.tar.bz2 |
Xcode: add proper target dependencies to custom targets.
Diffstat (limited to 'mesonbuild')
-rw-r--r-- | mesonbuild/backend/xcodebackend.py | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/mesonbuild/backend/xcodebackend.py b/mesonbuild/backend/xcodebackend.py index 606469a..9635e82 100644 --- a/mesonbuild/backend/xcodebackend.py +++ b/mesonbuild/backend/xcodebackend.py @@ -909,9 +909,9 @@ class XCodeBackend(backends.Backend): ntarget_dict.add_item('buildPhases', buildphases_array) generator_id = 0 for g in t.generated: - if isinstance(g, build.CustomTarget): - buildphases_array.add_item(self.shell_targets[g.get_id()], f'/* {g.name} */') - elif isinstance(g, build.GeneratedList): + # Custom target are handled via inter-target dependencies. + # Generators are built as a shellscriptbuildphase. + if isinstance(g, build.GeneratedList): buildphases_array.add_item(self.shell_targets[(tname, generator_id)], 'Generator {}/{}'.format(generator_id, tname)) generator_id += 1 for bpname, bpval in t.buildphasemap.items(): @@ -934,6 +934,8 @@ class XCodeBackend(backends.Backend): dep_array.add_item(idval, 'PBXTargetDependency') generator_id = 0 for o in t.generated: + if isinstance(o, build.CustomTarget): + dep_array.add_item(self.pbx_custom_dep_map[o.get_id()], o.name) if not isinstance(o, build.GeneratedList): continue |