Skip to content

Commit 78042e9

Browse files
committed
Add helpful hints if codesigning lookup fails
1 parent e3b26ea commit 78042e9

1 file changed

Lines changed: 10 additions & 7 deletions

File tree

build_scripts/apple_utils.py

Lines changed: 10 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -296,8 +296,11 @@ def ConfigureCMakeExtraArgs(context, args:List[str]) -> List[str]:
296296

297297
# Signing needs to happen on all systems
298298
if context.macOSCodesign:
299-
args.append(f"-DCMAKE_XCODE_ATTRIBUTE_CODE_SIGN_IDENTITY={GetCodeSignID()}")
300-
args.append(f"-DCMAKE_XCODE_ATTRIBUTE_DEVELOPMENT_TEAM={GetDevelopmentTeamID()}")
299+
try:
300+
args.append(f"-DCMAKE_XCODE_ATTRIBUTE_CODE_SIGN_IDENTITY={GetCodeSignID()}")
301+
args.append(f"-DCMAKE_XCODE_ATTRIBUTE_DEVELOPMENT_TEAM={GetDevelopmentTeamID()}")
302+
except Exception as e:
303+
raise RuntimeError(f"Failed to get Codesigning data. Make sure you're signed in to your codesigning team. {e}")
301304

302305
return args
303306

@@ -436,7 +439,10 @@ def BuildXCFramework(root, targets, args):
436439
print("""Success! Add the OpenUSD.xcframework to your Xcode Project.""")
437440

438441
def main():
439-
import argparse
442+
443+
444+
if __name__ == '__main__':
445+
main()import argparse
440446
parser = argparse.ArgumentParser(description="A set of command line utilities for building on Apple Platforms")
441447
subparsers = parser.add_subparsers(dest="command", required=True)
442448

@@ -455,7 +461,4 @@ def main():
455461
if command == "xcframework":
456462
BuildXCFramework(args.install_dir, args.build_targets, unknown)
457463
else:
458-
raise RuntimeError(f"Unknown command: {command}")
459-
460-
if __name__ == '__main__':
461-
main()
464+
raise RuntimeError(f"Unknown command: {command}")

0 commit comments

Comments
 (0)