I need to use OpenCV in a Qt application that uses Qbs and QML in Windows
I am using the MVSC2017 (64-bit) compiler that got installed with Qt 5.11
and I have OpenCV 3.41 (I have to link against opencv_world341.lib)
I know it's in C:\opencv\build, but as far as I understand Qbs, I can't use the path from 'C:' (please tell me if I'm wrong here)
I can't change to (C|Q)make, because I will need to integrate the functionality in this application into a bigger application using qbs, and the qml file
I tried using
import qbs
Project {
CppApplication {
Depends { name: "Qt.core" }
Depends { name: "Qt.quick" }
Depends { name: "OpenCV" }
cpp.cxxLanguageVersion: "c++11"
files: [
"main.cpp",
"qml.qrc",
]
}
CppApplication {
name: "OpenCV"
cpp.includePaths: ["../../../../../../opencv/build/include/"]
cpp.libraryPaths: ["../../../../../../opencv/build/x64/vc15/lib/"]
cpp.staticLibraries: "opencv_world341"
}
}
I determined the number of ../
with git bash starting from the directory containing the qbs file
but I get the error
C1083: Cannot open include file: 'opencv2/core.hpp': No such file or directory
am I doing something wrong in the Qbs file?
I know the opencv installation works, because I used it in visual studio community 2017 to test it