I'm using conan to build a handful of executable. Each executable requires a different set of libraries.
I'm building an installer and would like to find the runtime dependencies for each executable, copy them out of the .conan folder and into the staging area.
Is there a way to do that with conan?
For example, one of my executables requires libQt5Xml, which is distributed as an shared object (.so). The library is stored ~/.conan/data/qt/5.15.6///package/7b11ed4c9c45d7c7dde6e1a702e4fe4d3c4901c6/lib/libQt5Xml.so
It would be nice if I could:
I guess I can parse the conanfile and use globs but I'm wandering if there is a better way?
There are a couple of different ways to collect information and copy files from dependencies:
generate()
method of a consumer conanfile.py
, and iterate via self.dependencies
all the information, accessing the dep.package_folder
, or dep.cpp_info.bindir
, for example and do a copy()
conan install
, so no need to repeat the same generate()
in all recipes that you want to use it.