[CMake] Creating an installer using cpack

Domen Vrankar domen.vrankar at gmail.com
Fri Jan 9 15:04:32 EST 2015


> The lib files are not built by cmake but are dependencies for my program.

You could move external libraries wih something like this:
install(FILES /some/location/libsomething.so DESTINATION lib)

> The lib files are symbolic links to the /usr/local/lib directory. For
> example:
>
> Release/lib/libfltk2.so.2.0 -> /usr/local/lib/libfltk2.so.2.0
>
> With the tgz installer, the symlinks are flattened to their respective
> files.
> However, with the deb installer, the symlinks are kept.
> I would like the symlink to be flattened also in the deb installer. Then all
> would be peachy.

Hm... I'd expect tgz installer to preserve symlinks as well... From my
point of view deb installer works correctly since external libraries
should be in a separate package or part of your package but copied
with install commands.

One other reason for preserving symlinks would be that with symlink
flattening case you would have to complicate packaging functionality
for cases where you want to package a library libftk2.so and a
symbolic link to it libftk2.so.2.0 (and that is the usual way when
installing libraries on Linux - back compatibility with multiple
versions of the same library and so on...).

Regards,
Domen


More information about the CMake mailing list