Differences between Include Dirst - Compiled x Installed
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!
this will install an older, 3. 2.x opencv version, with a different include folder structure
I have added on CMake requirements for 4.0.0 at least for OpenCV. However, example from older versions signal the same "opencv2/header.hpp" structure.
E.g at opencv 3.2.0 https://docs.opencv.org/3.2.0/dc/dd3/...