[CMake] change where package is generated; full name of package with extension
Eric Noulard
eric.noulard at gmail.com
Fri Jun 18 13:12:30 EDT 2010
2010/6/18 Tyler Roscoe <tyler at cryptio.net>:
> On Fri, Jun 18, 2010 at 06:30:25PM +0200, Eric Noulard wrote:
>> 2010/6/18 Tyler Roscoe <tyler at cryptio.net>:
>> > 1. I want to change where "make package" deposits the packages it
>> > creates. Is there a way to do this -- some cpack variable I haven't
>> > found?
>>
>> No variable I am aware of.
>> However you may create a custom target which call make package and then
>> move the file, provided you know the name of the generated file ....
>
> The frustrating part here is that I can't add_dependencies or post-build
> custom_commands to the PACKAGE target because it is a "magic" CMake
> target. I suppose I can look into writing a custom_command that runs
> cpack with appropriate arguments, but I hoped to avoid this step.
Or you can propose a patch for this long-running feature request
http://public.kitware.com/Bug/view.php?id=8438
:-)
>> > but how do I calculate "some_extension"? Is there some mapping between package type
>> > (TGZ, ZIP, NSIS) and the extension it ends up with (.tar.gz, .zip,
>> > .exe)?
>>
>> Concerning the extension, it is fixed in the C++ code of the generator
>> in the GetOutputExtension method:
>
> Yeah, I was afraid of this. Looks like I'll need to maintain my own
> mapping of cpack generator types -> extensions on disk.
... or propose a patch for CPack which builds this map while running for you.
--
Erk
Membre de l'April - « promouvoir et défendre le logiciel libre » -
http://www.april.org
More information about the CMake
mailing list