Hello,
I have created a project using opencv and CMake. I am using the following in CMake:
find_package( OpenCV REQUIRED )
message(${OpenCV_INCLUDE_DIRS})
However, on my computer (OpenCV manually compiled) this points to /usr/local/include/opencv4
.
Thus, when I use #include <opencv2/core.hpp>
it compiles.
I was trying to compile the project on a friends computer (Ubuntu, just apt-get install libopencv-dev
). On his computer, this points to /usr/include/opencv
. From what I understand, this folder is for the older c-style API, right? His computer has a /usr/include/opencv2/core.hpp
, so I guess that in order to be able to #include <opencv2/core.hpp>
the include dir should be /usr/include
.
How should I proceed in order to ensure this works accross computers (and OS's, since one of the guys at the lab will have to run Windows)?
Thanks in advance!