How to compile or download opencv2.xcframework for iOS & Mac linking?

Hi all,
I have a released iPhone/iPad app that uses opencv2.framework without any problems. It would be great to be able to compile it for MacOS, so I tried to do so. XCode promptly told me, “Building for Mac Catalyst, but the linked framework ‘opencv2.frame’ was built for iOS + iOS Simulator. You need to restrict the platforms for which this framework should be linked in the target editor, or replace it with an XCFramework that supports both platforms.”

Ok, that sounds reasonable - someone must have already done this and has instructions. But, I don’t know where to start and can’t find any good docs or anything that detail how to compile such a library.

I would be content with downloading a static xcframework if someone has already done it - or I could compile one myself if there were instructions somewhere.
Can anyone help?