[CMake] Creating project distribution using cpack.

Rob Mathews Rob.Mathews at varolii.com
Tue May 8 14:13:50 EDT 2007


The bug with CPack is even if you don't want to use it, CMake checks for
it whilst autoconfiguring, and then fails when it can't find it. 

There is no way to turn this off. I had to build a version of CMake with
that check commented out.


-----Original Message-----
From: cmake-bounces+rmathews=envoyww.com at cmake.org
[mailto:cmake-bounces+rmathews=envoyww.com at cmake.org] On Behalf Of Alan
W. Irwin
Sent: Tuesday, May 08, 2007 11:03 AM
To: Ajay Divekar
Cc: cmake at cmake.org
Subject: Re: [CMake] Creating project distribution using cpack.

On 2007-05-08 08:55-0400 Ajay Divekar wrote:

> Hi,
>
> I am trying to use cpack to create a distribution for my project. I
have cmake
> install functionality already working. The make install utility copies
a
> bunch of executables to the bin directory. But for my project I need
to copy
> in the distribution certain other directories as well.

Cpack does two kinds of distributions/releases.

(1) Source release.  This includes everything in your source tree except
for
files specified by a regex stored in CPACK_SOURCE_IGNORE_FILES.
Normally, if
you have not built in your source tree, this is just the source files
(except
the source files you don't want to release).

(2) Binary release.  This includes everything that "make install"
normally
puts in your install tree.  Note, this functionality only works if your
install DESTINATION is specified relative to CMAKE_INSTALL_PREFIX.
There is
currently a bug in cpack which does not allow absolute DESTINATIONs.
(See the INSTALL documentation which explains the distinction between
relative and absolute DESTINATIONs.)

Above you stated that you wanted more in your binary release than what
is
currently in your install tree.  The simple answer to that is use the
INSTALL command to put the required files into your install tree.

>
> Can anybody tell me how to proceed to create a disctibution with this
setup. I
> have  problesms with CPACK_INSTALL_CMAKE_PROJECTS tag as its looks for
> pre-installe target and also the 4 values that it requires are also
not very
> clear to me.

CPack is normally just set up with commands (typically the last ones) in
the
top-level CMakeLists.txt file.  Inspect that file for CMake itself (or
http://plplot.svn.sourceforge.net/viewvc/plplot/trunk/CMakeLists.txt?vie
w=log
for the PLplot software) to see what to do.  Once that top-level
CMakeLists.txt file is set up, you run cmake then make a source release
with
"make package_source" and a binary release (assuming you use relative
install
DESTINATIONs) with "make package".

Also, there is a specific wiki item for CPack;
http://www.cmake.org/Wiki/CMake:Packaging_With_CPack as well as other
bits
of cpack documentation you can find by searching the wiki for "cpack".

Alan
__________________________
Alan W. Irwin

Astronomical research affiliation with Department of Physics and
Astronomy,
University of Victoria (astrowww.phys.uvic.ca).

Programming affiliations with the FreeEOS equation-of-state
implementation
for stellar interiors (freeeos.sf.net); PLplot scientific plotting
software
package (plplot.org); the libLASi project (unifont.org/lasi); the Loads
of
Linux Links project (loll.sf.net); and the Linux Brochure Project
(lbproject.sf.net).
__________________________

Linux-powered Science
__________________________
_______________________________________________
CMake mailing list
CMake at cmake.org
http://www.cmake.org/mailman/listinfo/cmake




More information about the CMake mailing list