[CMake] CPack DEB Packaging: Automate dependency resolution

Hendrik Sattler post at hendrik-sattler.de
Sun Nov 2 13:48:52 EST 2008

Am Saturday 01 November 2008 12:44:39 schrieb David Graf:
> Currently in my project, I provide all dependencies for DEB packaging in
> CPack by setting the variable CPACK_DEBIAN_PACKAGE_DEPENDS. Is there a
> possibility to automate this process (similar to the behavior of the
> CPack RPM packaging mechanism)?
> As far as I understood it correctly, such a mechanism must be
> implemented with the Linux tool 'objdump' to get the dependencies of
> shared libraries. I already thought about implementing my own script to
> get these dependencies of my shared libraries automatically. But first,
> I wanted to make sure that I do not reinvent the wheel. Especially
> because I found the following entry in 'CPackDeb.cmake' next to the
> dependency section:  ' TODO: automate 'objdump -p | grep NEEDED'.

No, you would get libraries but on Debian you should use dpkg-shlibdeps 
instead (or read its manpage and do it the same).


More information about the CMake mailing list