Configuring OpenCV with Qt and OpenGL support


I’m trying to compile opencv from source and include Qt and OpenGL support. but my configuration results keep saying they’re not included.

This is the cmake command that I’m using:

-D CMAKE_INSTALL_PREFIX=/path/to/opencv-4.5.5/build \

And this is part of the configuration result:

--   GUI:                           COCOA
--     QT:                          NO
--     Cocoa:                       YES
--     OpenGL support:              NO
--     VTK support:                 NO

Am I supposed to preinstall Qt and OpenGL prior to using cmake? any ideas how to further debug this? thanks in advance for your help.

Yes. You need to install those libraries (with development packages) in order to be able to use them.

1 Like

Thank you very much! I installed both via Homebrew and now it compiles and runs like mint!

brew install qt
brew install freeglut

I ran cmake again with the same flags and I was good to go!