Ecosyste.ms: Awesome

An open API service indexing awesome lists of open source software.

Awesome Lists | Featured Topics | Projects

https://github.com/faaxm/lipo-dir-merge

Combine libraries of different architectures in different directory trees into universal binaries
https://github.com/faaxm/lipo-dir-merge

Last synced: about 4 hours ago
JSON representation

Combine libraries of different architectures in different directory trees into universal binaries

Awesome Lists containing this project

README

        

# lipo-dir-merge

This script helps you easily build universal static libraries for macOS.

It takes two directory trees, containing the library, its headers and any other related documents for each architecture (e.g. x86 and ARM) and then merges them to produce a single directory with the universal binary.

While traversing both source directory trees, all files without the `.a` extension are copied from the first tree into the output directory. If a static library is found, it is looked up in the second directory tree and both versions are merged using `lipo`.

Run it like this:
```
$ python3 lipo-dir-merge.py
```

## Resources
* [A blog post on using lipo to build universal binaries](https://www.f-ax.de/dev/2021/01/15/build-fat-macos-library.html)
* [A blog post on building universal binaries with vcpkg](https://www.f-ax.de/dev/2022/11/09/how-to-use-vcpkg-with-universal-binaries-on-macos/)