The c++ code needs to be built on a) intel chip computer, b) m chip computer. How can I distribute libraries for mac with different architectures like that via yak? What key tag I need to use?
For now I used mac and win tags. But now I see there is are sub-mac tags needed…
Instead of distributing different libraries you should look into creating universal build of your libraries, that is create a .dylib that contains both the arm64 and x86_64 architectures.
For instance the C/C++ dylib for the Cycles integration inspected with the command file gives this information on the command-line:
This one library works on both Intel and Apple silicon Macs. My RhinoCycles plug-in consumes this single library.
Of course any and all unmanaged dependencies need to be also universal libraries with both architectures in.
You can do that either with your build tools, or manually after building using otool. If you use CMake to do the building you can define -DCMAKE_OSX_ARCHITECTURES=arm64;x86_64 on the command-ine to cmake.
I use otool and file, and indeed lipo from the guide linked by @dale. otool for checking structure etc, lipo to mash together two different architectures manually.