Skip to content

Commit

Permalink
Merge pull request #167 from alliedmodders/psy/vsgen-name-fix
Browse files Browse the repository at this point in the history
Make naming of name attribute consistent between vs gen and ambuild gen
  • Loading branch information
psychonic authored Jun 15, 2024
2 parents ea242ff + 5bfd3ce commit d678cd1
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
6 changes: 3 additions & 3 deletions ambuild2/frontend/v2_2/vs/cxx.py
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ def GetProjectFileSuffix(version):
class Project(object):
def __init__(self, ctor, name):
self.ctor_ = ctor
self.name_ = name
self.name = name
self.sources = []
self.include_hotlist = []
self.builders_ = []
Expand All @@ -53,7 +53,7 @@ def default(self, compiler):
# Attach finish/generate methods to this builder, so it generates a
# projeet file. This is a wrapper around the older API which does not
# wrap binaries in projects.
builder = self.Configure(compiler, self.name_, 'Default')
builder = self.Configure(compiler, self.name, 'Default')
builder.finish = self.finish
builder.generate = lambda generator, cx: self.generate(generator, cx)[0]
return builder
Expand All @@ -78,7 +78,7 @@ def generate_split(self, generator, cx):
def generate_combined(self, generator, cx):
outputs = []
proj_path = paths.Join(cx.localFolder,
self.name_ + GetProjectFileSuffix(generator.vs_vendor.version))
self.name + GetProjectFileSuffix(generator.vs_vendor.version))
node = nodes.ProjectNode(cx, proj_path, self)
for builder in self.builders_:
tag_folder = generator.addFolder(cx, builder.localFolder)
Expand Down
2 changes: 1 addition & 1 deletion ambuild2/frontend/v2_2/vs/export_vcxproj.py
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,7 @@ def export_body(cm, node, xml):
version = cm.generator.vs_vendor.version
with xml.block('PropertyGroup', Label = 'Globals'):
xml.tag('ProjectGuid', '{{{0}}}'.format(node.uuid))
xml.tag('RootNamespace', node.project.name_)
xml.tag('RootNamespace', node.project.name)
xml.tag('Keyword', 'Win32Proj')
if version >= 'msvc-1910':
win_sdk_version = os.getenv('WindowsSDKVersion', None)
Expand Down

0 comments on commit d678cd1

Please sign in to comment.