[CMake] CPack: howto change directory layout depending on the generator

Alexander Neundorf a.neundorf-work at gmx.net
Thu Oct 2 18:15:51 EDT 2008


On Friday 19 September 2008, Tanguy Krotoff wrote:
> Hi everybody
>
> I would like to change the directory layout generated by CPack given
> the generator used.

AFAIK this is currently not possible.
And actually I'd also think it may not be a really good idea.
Why do you want to have a different directory structure when installing your 
package as RPM, instead of e.g. TGZ ?
If it works for TGZ, it works for RPM too.

What you could do is to add a cmake option 
INSTALL_WITH_OTHER_DIRECTORY_STRUCTURE, and depending on this set the install 
directory variables (you should use variables for the destinations then) and 
the supported package formats accordingly.
This would mean you need (at least) two buildtrees, one for one dir structure, 
one for the other.

Alex


More information about the CMake mailing list