From 75d87ac526d21e6422d108be85b71b01c0ec964d Mon Sep 17 00:00:00 2001 From: Kjell Wooding Date: Sat, 12 Jan 2019 20:59:04 -0500 Subject: [PATCH] add frameworks via update subcommand --- toolchain.py | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/toolchain.py b/toolchain.py index 7b51445..1e00836 100755 --- a/toolchain.py +++ b/toolchain.py @@ -1111,11 +1111,12 @@ def ensure_recipes_loaded(ctx): recipe.init_with_ctx(ctx) -def update_pbxproj(filename): +def update_pbxproj(filename, pbx_frameworks=None): # list all the compiled recipes ctx = Context() pbx_libraries = [] - pbx_frameworks = [] + if pbx_frameworks is None: + pbx_frameworks = [] frameworks = [] libraries = [] sources = [] @@ -1370,6 +1371,7 @@ Xcode: parser = argparse.ArgumentParser( description="Update an existing xcode project") parser.add_argument("filename", help="Path to your project or xcodeproj") + parser.add_argument("--add-frameworks", nargs="*", help="Frameworks to add to this project") args = parser.parse_args(sys.argv[2:]) filename = args.filename @@ -1387,7 +1389,7 @@ Xcode: print("ERROR: {} not found".format(filename)) sys.exit(1) - update_pbxproj(filename) + update_pbxproj(filename, pbx_frameworks=args.add_frameworks) print("--") print("Project {} updated".format(filename))