[CMake] Fwd: Installation package

Eric Noulard eric.noulard at gmail.com
Wed Jun 10 04:43:47 EDT 2009


Forgot the list...sorry


---------- Forwarded message ----------
From: Eric Noulard <eric.noulard at gmail.com>
Date: 2009/6/10
Subject: Re: [CMake] Installation package
To: Pascale B <chose29 at hotmail.com>


2009/6/10 Pascale B <chose29 at hotmail.com>:
> 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?

I understand that you use the ZIP CPack Generator which is somehow a
relatively "stupid" one which is a "passive" archive.

If you want something more like an installer which may launch appropriate
action when installing the software you should look at:

DEB, RPM or may NSIS CPack generator.

See:
http://www.cmake.org/Wiki/CMake:CPackPackageGenerators

DEB is for debian-based linux distribution (Debian, Ubuntu, and the like)
RPM is for rpm-based distros (RedHat, Fedora, Mandriva etc...)


You may chose the CPack generator on either
 in your CMakeLists.txt
SET(CPACK_GENERATOR "ZIP;RPM")

or on the command line with CPack:

cd /path/to/builddir
cpack -G <GENNAME>
i.e.

cpack -G DEB
or
cpack -G RPM


--
Erk



-- 
Erk


More information about the CMake mailing list