Skip to content

Commit

Permalink
Fix SConstruct for scons 4.5+
Browse files Browse the repository at this point in the history
In scons 4.5+ env['CPPDEFINES'] can sometimes return a deque object.
See SCons/scons#4321
  • Loading branch information
arbruijn committed Apr 16, 2023
1 parent b9e30e9 commit 6bc047b
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion d1/SConstruct
Original file line number Diff line number Diff line change
Expand Up @@ -371,7 +371,7 @@ class DXXProgram(DXXCommon):
objects = [self.env.StaticObject(target='%s%s%s' % (self.user_settings.builddir, os.path.splitext(s)[0], self.env["OBJSUFFIX"]), source=s) for s in self.common_sources]
objects.extend(self.platform_settings.platform_objects)
objects.extend(program_specific_objects)
versid_cppdefines=env['CPPDEFINES'][:]
versid_cppdefines=list(env['CPPDEFINES'])
if self.user_settings.extra_version:
versid_cppdefines.append(('DESCENT_VERSION_EXTRA', '\\"%s\\"' % self.user_settings.extra_version))
objects.append(self.env.StaticObject(target='%s%s%s' % (self.user_settings.builddir, 'main/vers_id', self.env["OBJSUFFIX"]), source='main/vers_id.c', CPPDEFINES=versid_cppdefines))
Expand Down
2 changes: 1 addition & 1 deletion d2/SConstruct
Original file line number Diff line number Diff line change
Expand Up @@ -372,7 +372,7 @@ class DXXProgram(DXXCommon):
objects = [self.env.StaticObject(target='%s%s%s' % (self.user_settings.builddir, os.path.splitext(s)[0], self.env["OBJSUFFIX"]), source=s) for s in self.common_sources]
objects.extend(self.platform_settings.platform_objects)
objects.extend(program_specific_objects)
versid_cppdefines=env['CPPDEFINES'][:]
versid_cppdefines=list(env['CPPDEFINES'])
if self.user_settings.program_name:
exe_target = self.user_settings.program_name
if self.user_settings.extra_version:
Expand Down

0 comments on commit 6bc047b

Please sign in to comment.