Building with static OpenCV libraries
This applies for any UNIX or UNIX-like OS, then Windows, but I have built my C++ (no platform specific code) that uses OpenCV and SDL2 on macOS Sonoma first, according to process of creating .App bundle. In addition, OpenGL is system-available on macOS. I’m using Makefile.