diff --git a/cmake/scripts/fixup_bundle.apple.py b/cmake/scripts/fixup_bundle.apple.py index df354ba6f7ec4a53c4f6d52af5de27d7ce3a18f4..909756eb9461871deb0a5c3eae20655aea3374a9 100755 --- a/cmake/scripts/fixup_bundle.apple.py +++ b/cmake/scripts/fixup_bundle.apple.py @@ -581,7 +581,7 @@ def copy_library(destination, library, dry_run=False, library_dest='Libraries', if os.path.exists(destination): shutil.rmtree(destination) _os_makedirs(app_dest) - shutil.copytree(os.path.join(library.framework_path, library.framework_name), destination, symlinks=True) + shutil.copytree(os.path.join(library.framework_path, library.framework_name), destination, ignore=shutil.ignore_patterns('_CodeSignature'), symlinks=True) # We need to make sure the copied libraries are writable. chmod = Pipeline([ @@ -746,6 +746,7 @@ def _fix_installed_binaries(installed, dry_run=False): # Go through all of the binaries installed and fix up references to other things. for binary_info in installed.values(): binary, installed_path = binary_info + print('Fixing binary references in %s' % binary.path) if not dry_run and binary.installed_id: @@ -772,6 +773,15 @@ def _fix_installed_binaries(installed, dry_run=False): ]) install_name_tool() + print('Removing signatures from %s' % binary.path) + if not dry_run: + codesign = Pipeline([ + 'codesign', + '--remove-signature', + installed_path, + ]) + codesign() + def _update_manifest(manifest, installed, path): '''Update the manifest file with a set of newly installed binaries.'''