Use property for LinuxPlatformSettings ogllibs
It is only called once per instance, so caching it as an instance value is not helpful. Change it to a property so that __init__ can be removed.
This commit is contained in:
parent
bd391e2363
commit
e7c65dbc3f
|
@ -2623,12 +2623,13 @@ class DXXCommon(LazyObjectConstructor):
|
||||||
env.Append(FRAMEWORKPATH = [os.path.join(os.getenv("HOME"), 'Library/Frameworks'), '/System/Library/Frameworks/ApplicationServices.framework/Versions/A/Frameworks'])
|
env.Append(FRAMEWORKPATH = [os.path.join(os.getenv("HOME"), 'Library/Frameworks'), '/System/Library/Frameworks/ApplicationServices.framework/Versions/A/Frameworks'])
|
||||||
# Settings to apply to Linux builds
|
# Settings to apply to Linux builds
|
||||||
class LinuxPlatformSettings(_PlatformSettings):
|
class LinuxPlatformSettings(_PlatformSettings):
|
||||||
def __init__(self,program,user_settings):
|
@property
|
||||||
DXXCommon._PlatformSettings.__init__(self,program,user_settings)
|
def ogllibs(self):
|
||||||
self.ogllibs = (user_settings.opengles_lib, 'EGL') if user_settings.opengles else ('GL', 'GLU')
|
user_settings = self.user_settings
|
||||||
|
return (user_settings.opengles_lib, 'EGL') if user_settings.opengles else ('GL', 'GLU')
|
||||||
def adjust_environment(self,program,env):
|
def adjust_environment(self,program,env):
|
||||||
env.Append(CPPDEFINES = ['HAVE_STRUCT_TIMESPEC', 'HAVE_STRUCT_TIMEVAL'])
|
env.Append(CPPDEFINES = ['HAVE_STRUCT_TIMESPEC', 'HAVE_STRUCT_TIMEVAL'])
|
||||||
env.Append(CCFLAGS = ['-pthread'])
|
env.Append(CXXFLAGS = ['-pthread'])
|
||||||
|
|
||||||
def __init__(self):
|
def __init__(self):
|
||||||
LazyObjectConstructor.__init__(self)
|
LazyObjectConstructor.__init__(self)
|
||||||
|
|
Loading…
Reference in a new issue