-
Notifications
You must be signed in to change notification settings - Fork 0
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Support universal libraries on macOS #11
Conversation
Currently fails to build on macos because of libpng build issues. Possible reference: pnggroup/libpng#372 |
33e5375
to
c8357e3
Compare
I seem to have it working now. macOS multiarch appears to require an Apple Silicon host to build everything correctly, at least on the GitHub runners. Waiting to see if my libpng patch gets merged. |
The ability to use the official libpng source for this feature is currently waiting on two upstream PRs. In the meantime, we're going to merge this using a patched fork for the libpng reference. Issue #12 will track the status of those two PRs. |
Adds CMake flag
BUILD_MACOS_MULTIARCH
, which compiles all dependencies as "universal libraries" (single file containing symbols forx86_64
andarm64
).Enabling this feature additionally requires building
libpng
from source rather than using the built-in version from OpenCV, so this also adds the flagVCDEPS_BUILD_PNG
. To maintain expected behavior, this is off by default, enabled whenBUILD_MACOS_MULTIARCH=ON
, and can of course be controlled by setting the flag manually.