[CMake] More than one package source for a project.

Eric Noulard eric.noulard at gmail.com
Fri Jun 15 09:30:02 EDT 2012


2012/6/15 Darryl L. Pierce <dpierce at redhat.com>:
> On Fri, Jun 15, 2012 at 09:05:26AM +0800, Doug wrote:
>> Oddly, I was just doing that last night. Here's an example:
>> https://github.com/shadowmint/cmake-multi-install
>>
>> If you run:
>> mkdir build
>> cd build
>> cmake ..
>> cmake -G DEB
>>
>> It'll build two debian packages.
>> If you want RPMs I suspect you'll have to add:
>>
>>  set(CPACK_RPM_COMPONENT_INSTALL ON)
>>
>> ...but you get the idea.
>> No idea why this isn't in the wiki. It keeps turning up as a question...
>>
>> Also, it doesn't work on all the pack builders.
>
> Specifically what I want to do is put the subset of sources into a separate
> gzipped tarball rather than it create an RPM (we have an official workflow
> for RPM creation on the distro side of things).

You should be able to do that using custom made
CPack config files and appropriate value for
CPACK_INSTALLED_DIRECTORIES.

then invoke cpack -G TGZ --config <YourConfigFile>


you may invoke cpack from a custom command.

-- 
Erk
Le gouvernement représentatif n'est pas la démocratie --
http://www.le-message.org


More information about the CMake mailing list