0

I'm creating a conan package for OpenCV but am at a loss on what to put in package_info. Building OpenCV places .lib and .dll files in the paths x64\vc15\lib and x64\vc15\bin. This means that once I install the package and try to link I get linker errors as Visual C++ cannot find the files.

What is the correct way of making these files available to Visual Studio? Should I add code to the package method to move the bin and lib directories out of x64 and into package_folder or should I add code to package_info to indicate the path to those directories via self.cpp_info.libdirs?

ruipacheco
  • 15,025
  • 19
  • 82
  • 138
  • First all, don't remove this question! The last two questions you just removed after receiving an answer. There is a well implemented package for OpenCV: https://github.com/conan-community/conan-opencv you can take it as base for your study. All .dll files should be available in \bin by convention, and all .lib should be available in \lib. You need to copy from where they are to self.package_folder\bin and self.package_folder\lib – uilianries Jul 04 '19 at 15:01
  • Also, as you are dealing with shared libraries, you can take look here: https://docs.conan.io/en/latest/howtos/manage_shared_libraries/env_vars.html – uilianries Jul 04 '19 at 15:04
  • I removed the questions because they did not make sense. At least to me. – ruipacheco Jul 05 '19 at 06:40

0 Answers0