diff options
-rw-r--r-- | mesonbuild/backend/vs2010backend.py | 7 |
1 files changed, 3 insertions, 4 deletions
diff --git a/mesonbuild/backend/vs2010backend.py b/mesonbuild/backend/vs2010backend.py index 378b1a8..fc241e3 100644 --- a/mesonbuild/backend/vs2010backend.py +++ b/mesonbuild/backend/vs2010backend.py @@ -493,14 +493,13 @@ class Vs2010Backend(backends.Backend): for s in gen_src: relpath = self.relpath(s, target.subdir) ET.SubElement(inc_src, 'CLCompile', Include=relpath) - if len(objects) + len(gen_objs) > 0: + if len(objects) > 0: + # Do not add gen_objs to project file. Those are automatically used by MSBuild, because they are part of + # the CustomBuildStep Outputs. inc_objs = ET.SubElement(root, 'ItemGroup') for s in objects: relpath = s.rel_to_builddir(proj_to_src_root) ET.SubElement(inc_objs, 'Object', Include=relpath) - for s in gen_objs: - relpath = self.relpath(s, target.subdir) - ET.SubElement(inc_objs, 'Object', Include=relpath) ET.SubElement(root, 'Import', Project='$(VCTargetsPath)\Microsoft.Cpp.targets') # Reference the regen target. ig = ET.SubElement(root, 'ItemGroup') |