I regularly compile the most recent version of OpenCV 3.X (with GPU-support and stuff) myself and set Python 3 bindings to a user virtual environment via -D PYTHON3_EXECUTABLE=...
and so on.
I do not need Python 2 or Java support, but OpenCV always compiles for the system Python 2 / Java in addition to my local C++/Python3 environment, thus I'd like to turn it off completely since Java recently broke the compilation (some ant error).
I already tried -D WITH_PYTHON=OFF
and -D WITH_JAVA=OFF
, but OpenCV still found Python 2 / Java on the system and compiled with support for them.
How could I disable Python 2 / Java for OpenCV compilation? What would some clean compilation flags for this purpose look like?