Merge pull request #339 from learnleapfly/add_frameworks
Add frameworks
This commit is contained in:
commit
11326c9d16
1 changed files with 5 additions and 3 deletions
|
@ -1132,10 +1132,11 @@ def ensure_recipes_loaded(ctx):
|
||||||
recipe.init_with_ctx(ctx)
|
recipe.init_with_ctx(ctx)
|
||||||
|
|
||||||
|
|
||||||
def update_pbxproj(filename):
|
def update_pbxproj(filename, pbx_frameworks=None):
|
||||||
# list all the compiled recipes
|
# list all the compiled recipes
|
||||||
ctx = Context()
|
ctx = Context()
|
||||||
pbx_libraries = []
|
pbx_libraries = []
|
||||||
|
if pbx_frameworks is None:
|
||||||
pbx_frameworks = []
|
pbx_frameworks = []
|
||||||
frameworks = []
|
frameworks = []
|
||||||
libraries = []
|
libraries = []
|
||||||
|
@ -1391,6 +1392,7 @@ Xcode:
|
||||||
parser = argparse.ArgumentParser(
|
parser = argparse.ArgumentParser(
|
||||||
description="Update an existing xcode project")
|
description="Update an existing xcode project")
|
||||||
parser.add_argument("filename", help="Path to your project or xcodeproj")
|
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:])
|
args = parser.parse_args(sys.argv[2:])
|
||||||
|
|
||||||
filename = args.filename
|
filename = args.filename
|
||||||
|
@ -1408,7 +1410,7 @@ Xcode:
|
||||||
print("ERROR: {} not found".format(filename))
|
print("ERROR: {} not found".format(filename))
|
||||||
sys.exit(1)
|
sys.exit(1)
|
||||||
|
|
||||||
update_pbxproj(filename)
|
update_pbxproj(filename, pbx_frameworks=args.add_frameworks)
|
||||||
print("--")
|
print("--")
|
||||||
print("Project {} updated".format(filename))
|
print("Project {} updated".format(filename))
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue