Reposting my stack overflow question from : http://stackoverflow.com/questions/31362266/regarding-linking-external-native-libs-opencv-c-in-gradle
I am creating a project that uses opencv C++ code. As of this moment I am only able to find the java executables being hosted in maven central at :-
So I installed opencv on my system and started using that for my project. In order to compile my project with the opencv headers I introduced the following in my build.gradle script:-
// C++ specific build configurations
// Acquiring environment variables
def opencvhome = System.getenv(“OPENCV_HOME”)
def opencvinclude = opencvhome + “\include”
srcDirs “src/main/include”, opencvinclude
This was for including the necessary headers. Notice the opencvinclude part as picked up as an environment variable which I set to the install location before running the gradle build.
Now my question is how do I add additional linkage dependencies of opencv?
I consulted the above documentation. It only covers dependencies that are themselves gradle projects. But opencv C++ is not a gradle project. Can someone please help me out with this?