0

How can I install runtime dependencies with cmake INSTALL() commad.

I want to install ${OpenCV_INCLUDE_DIRS} headers and ${OpenCV_LIBS} libraries with cmake INSTALL() functionality.

eheperson
  • 51
  • 1
  • 10
  • Headers aren't runtime dependencies. It's not quite clear what you want to do. Did you mean *build* dependencies instead? Are you building OpenCV or do you want to use OpenCV in your project? – Jonathan S. May 15 '22 at 16:33
  • I builded OpenCV from source to use in my project and builded in with no error. I can run my app from build folder without error. When i use cmake INSTALL command, my app istalling properly but i cannot run my app from install directory. It returns `Cannot find shared library` or `cannot find shared object`. How can I overcome to this problem, I want to distribute all runtime dependencies with my package, or if you can suggest a better approach? – eheperson May 15 '22 at 16:47
  • Is this what you are looking for: https://stackoverflow.com/a/44218752/18667225 ? – Markus May 15 '22 at 19:05
  • I tried this with target_include_directories. İs there any main difference between include_directories() and target_include_directories() ? – eheperson May 15 '22 at 19:10
  • See https://stackoverflow.com/a/51968659/18667225 – Markus May 15 '22 at 19:49

0 Answers0