I want to use some dlib opencv headers in the pub-sub application of ros. I tried to include the dlib libraries in the ros-package cmake files as follows:
My dlib installation source path: /home/xxxx/computervision/dlib-18.18/dlib
So I included it in cmake file of ros-pkg the following way:
" set (dlib_DIR "/home/praneeth/computervision/dlib-18.18/dlib/") find_package(dlib 18.18 REQUIRED) " (went through the similar way of including a opencv library inside ros-pkg cmake)
But I am facing with the error:
" Could not find a package configuration file provided by "dlib" (requested version 18.18) with any of the following names:
dlibConfig.cmake
dlib-config.cmake
Add the installation prefix of "dlib" to CMAKE_PREFIX_PATH or set "dlib_DIR" to a directory containing one of the above files. If "dlib" provides a separate development package or SDK, be sure it has been installed. "
Even though the dlib folder of the above source path has dlibConfig.cmake.in file in it.
Any help on how to include these libraries?
Found the answer to this!! This reference sourceforge.net/p/dclib/discussion/442517/thread/efc8d59d gave me a hint to look into dlib/examples/CMakeLists.txt and follow the same. Since, I know my dlib installation path, I simply included in my project (external to dlib source tree) CMakeLists.txt, the following code include(dlibsourcepath_until_cmake)
and while compiling a program in my project, i have added dlib as one of its target link libraries as
target_link_libraries(program_executable_name ${catkin_LIBRARIES} ${OpenCV_LIBRARIES} dlib)