V
V
Vitaly Stolyarov2017-03-14 21:03:07
linux
Vitaly Stolyarov, 2017-03-14 21:03:07

How to automatically export dependencies to a project built with Cmake?

target_link_libraries specifies all the required libraries, mostly they are located in the standard path /usr/local/lib (as found by find_package).
How can I copy these dependencies to the folder with the executable, since they are dynamically linked and required when porting to another system?

Answer the question

In order to leave comments, you need to log in

1 answer(s)
S
Stanislav Makarov, 2017-03-15
@Ni55aN

What systems are we talking about? If it's about the debian family, then why not build a package? On linux distros, it is usually customary for the package manager to satisfy dynamic dependencies.
CPack will help you build the package. For example, here is a variable where you need to list dependency packages: CPACK_DEBIAN_PACKAGE_DEPENDS .

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question