[CMake] [cmake-developers] Support for multiple components in cpack

Eric Noulard eric.noulard at gmail.com
Tue Aug 3 15:47:07 EDT 2010


2010/8/3 Eric Noulard <eric.noulard at gmail.com>:
> 2010/8/3 Dr. Stefan Sablatnög <stefan.sablatnoeg at svox.com>:
>> Hi all,
>>
>> first of all many thanks for considering to provide such a functionality.
>> I tried it on an small example yesterday and it worked as expected
>> (I patched against cmake 2.8.2), a larger test will follow as soon as I
>> find the time.
>
> Ok thanks.
> Do not hesitate to give us more feedback when you find the time to do
> more extensive tests.
> Give your feedback either on the list and/or on the bug tracker:
> http://public.kitware.com/Bug/view.php?id=10736
>
>> One minor thing (maybe a different issue?),
>> I am not quite sure of yet is how to handle the destination
>> of the packages? Is there already way to produce (or copy) the packages
>> to a user defined place (we usually put our final deliveries under revision
>> control, so it would be ideal if the package would be in the "right" place
>> automatically after each build.)
>
> I think this is another issue.
> You may already be able to do what you want if you set CPACK_PACKAGE_DIRECTORY
>
> e.g
> try cpack -D CPACK_PACKAGE_DIRECTORY=/tmp -G ZIP
>
> if it is not working for you then open a feature request which explain
> precisely your need.

Just one more precision.
CPACK_PACKAGE_DIRECTORY is currently used as the root directory
used by CPack to do the packaging (including the creation of the

${CPACK_PACKAGE_DIRECTORY}/_CPack_Packages

hierarchy so if you do use "cpack -D CPACK_PACKAGE_DIRECTORY=/tmp"
the [final] packages will be put in "/tmp" but you will end-up with a
tmp/_CPack_Packages directory too.

If the behavior you want is "only" to have the final packages in "/tmp"
then the current CPACK_PACKAGE_DIRECTORY is not enough
and you should file a feature request which describe what you need/want
precisely.

On way to avoid  the spurious "_CPack_Packages" dir would be add
something like "automatic clean-up" whenever CPACK_PACKAGE_DIRECTORY
is specified on the command line.

Another way would be to add a new CPACK_PACKAGE_DESTINATION option
that if defined with a valid directory path value
would handle the final copy/move of the to this destination.

-- 
Erk
Membre de l'April - « promouvoir et défendre le logiciel libre » -
http://www.april.org


More information about the CMake mailing list