mirror of
https://github.com/kiwix/kiwix-build.git
synced 2025-06-28 05:49:33 +00:00
Make the platform responsible to add the targets.
This commit is contained in:
@ -56,6 +56,20 @@ class PlatformInfo(metaclass=_MetaPlatform):
|
||||
plt_name = 'neutral' if ToolchainClass.neutral else self.name
|
||||
targets[(plt_name, tlc_name)] = ToolchainClass.Builder
|
||||
|
||||
def add_targets(self, targetName, targets):
|
||||
if (self.name, targetName) in targets:
|
||||
return
|
||||
targetClass = Dependency.all_deps[targetName]
|
||||
targets[('source', targetName)] = targetClass.Source
|
||||
targets[(self.name, targetName)] = targetClass.Builder
|
||||
for dep in targetClass.Builder.get_dependencies(self):
|
||||
try:
|
||||
depPlatformName, depName = dep
|
||||
except ValueError:
|
||||
depPlatformName, depName = self.name, dep
|
||||
depPlatform = self.get_platform(depPlatformName, targets)
|
||||
depPlatform.add_targets(depName, targets)
|
||||
|
||||
def get_cross_config(self):
|
||||
return {}
|
||||
|
||||
|
Reference in New Issue
Block a user