[CMake] How to request features?

Alexander Neundorf a.neundorf-work at gmx.net
Fri Aug 3 10:15:09 EDT 2007


On Friday 03 August 2007 09:49, Christian Convey wrote:
> On 8/3/07, Alexander Neundorf <a.neundorf-work at gmx.net> wrote:
> > Currently we are in the process of migrating from phpbugtracker to
> > mantis, so better wait a few days until everything is working again as it
> > should.
>
> OK, will do.
>
> > P.S. which feature ?
>
> Request #1:
> My project produces multiple Debian (and soon, RPM) packages.  I'd
> like to not have to reconfigure the project for each .deb/.rpm package
> my script is about to produce.
>
> So the request is to be able to easily control (in a supported way)
> which installation component(s) will be installed when you run "make
> install".

Is this for packaging ?
CPack supports installing single components via  CPACK_INSTALL_CMAKE_PROJECTS.
If that's not what you need please explain.
Here's an example:
http://www.cmake.org/cgi-bin/viewcvs.cgi/ParaView3CPack.cmake?rev=HEAD&root=ParaView3&view=auto

> Request #2: (If not already true) ensure that CPack supports *all* of
> the fields from Debian control files, such as dependency lines.

Have a look at Modules/CPackDeb.cmake, there is a DEBIAN_PACKAGE_DEPENDS. Does 
this what you need ?

> Request #3: Provide an RPM generator for CPack (and ensure it supports
> all important fields, such as the dependency list).

Patches are welcome :-)
A problem with the rpm macro is that it builds the package again instead of 
using the already built install tree. The generated cmake call for the srpm 
file: 
cd build_tree
cmake -DCMAKE_INSTALL_PREFIX=%{rpmprefix} ../%{srcdirname}
make

also doesn't support additional options to cmake. Maybe the current 
CMakeCache.txt could be used for building the binary rpm:
cmake -C 
${CMAKE_BINARY_DIR}/CMakeCache.txt -DCMAKE_INSTALL_PREFIX=%{rpmprefix} ../%{srcdirname}

But this would break for the source rpm, since when building this there is no 
CMakeCache.txt.
How are srpms supposed to handle this ? The configure scripts may need 
additional arguments, same for cmake here.
What does rpmbuild do ?
Is it more than packaging the install tree together with some special files ?

Bye
Alex


More information about the CMake mailing list