[CMake] Installation package

Mathieu Malaterre mathieu.malaterre at gmail.com
Wed Jun 10 04:42:15 EDT 2009


On Wed, Jun 10, 2009 at 10:17 AM, Pascale B<chose29 at hotmail.com> wrote:
> Hi,
>
>    I work on a software that I am porting onto Linux. I used CMake with
> success and now want to use CPack. I successfully created a package file
> with a bin and lib path, both containing the exec file and the .so libraries
> needed.
>
>    Now  here is my problem: when I send this package to a user, after he
> unzips the package, he needs to move the shared libraries to the /usr/lib
> directory and proceed with the ldconfig command, otherwise when launching
> the exec file the shared libraries aren't found.
>
>    Is there a way to automatically do this? I can't find it in the doc or in
> mailing lists either. Should a makefile be included with the package that
> would proceed with the installation or does it need to be done manually each
> time?

No this is standard UNIX mechanism. On Win32 system, executables will
look for dll within the same directory and simple packaging works out
of the box.
The closest thing to reproduce this mechanism on *nix system is
implemented within kwsys (see SharedForward.h.in). Please note that
this is an invasive solution.

A user can simply extent the LD_LIBRARY_PATH to accommodate for your
particular package, else you have to install you lib in system path
(/usr/lib for example).

2cts
-- 
Mathieu


More information about the CMake mailing list