aboutsummaryrefslogtreecommitdiff
path: root/scripts/update_deps.py
diff options
context:
space:
mode:
Diffstat (limited to 'scripts/update_deps.py')
-rwxr-xr-xscripts/update_deps.py21
1 files changed, 21 insertions, 0 deletions
diff --git a/scripts/update_deps.py b/scripts/update_deps.py
index 7664a55f..d53760a0 100755
--- a/scripts/update_deps.py
+++ b/scripts/update_deps.py
@@ -3,6 +3,7 @@
# Copyright 2017 The Glslang Authors. All rights reserved.
# Copyright (c) 2018-2023 Valve Corporation
# Copyright (c) 2018-2023 LunarG, Inc.
+# Copyright (c) 2023-2023 RasterGrid Kft.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
@@ -117,6 +118,10 @@ examples of all of these elements.
The name of the dependent repository. This field can be referenced
by the "deps.repo_name" structure to record a dependency.
+- api
+
+The name of the API the dependency is specific to (e.g. "vulkan").
+
- url
Specifies the URL of the repository.
@@ -335,6 +340,7 @@ class GoodRepo(object):
self.build_step = json['build_step'] if ('build_step' in json) else 'build'
self.build_platforms = json['build_platforms'] if ('build_platforms' in json) else []
self.optional = set(json.get('optional', []))
+ self.api = json['api'] if ('api' in json) else None
# Absolute paths for a repo's directories
dir_top = os.path.abspath(args.dir)
self.repo_dir = os.path.join(dir_top, self.sub_dir)
@@ -579,6 +585,10 @@ def CreateHelper(args, repos, filename):
install_names = GetInstallNames(args)
with open(filename, 'w') as helper_file:
for repo in repos:
+ # If the repo has an API tag and that does not match
+ # the target API then skip it
+ if repo.api is not None and repo.api != args.api:
+ continue
if install_names and repo.name in install_names and repo.on_build_platform:
helper_file.write('set({var} "{dir}" CACHE STRING "" FORCE)\n'
.format(
@@ -655,6 +665,12 @@ def main():
help="Set build files configuration",
default='debug')
parser.add_argument(
+ '--api',
+ dest='api',
+ default='vulkan',
+ choices=['vulkan', 'vulkansc'],
+ help="Target API")
+ parser.add_argument(
'--generator',
dest='generator',
help="Set the CMake generator",
@@ -685,6 +701,11 @@ def main():
print('Starting builds in {d}'.format(d=abs_top_dir))
for repo in repos:
+ # If the repo has an API tag and that does not match
+ # the target API then skip it
+ if repo.api is not None and repo.api != args.api:
+ continue
+
# If the repo has a platform whitelist, skip the repo
# unless we are building on a whitelisted platform.
if not repo.on_build_platform: