i am using macOS arm, and install OpenCV for c++ using this command:
brew install --build-from-source OpenCV
download packages completed, and