[CMake] change where package is generated;	full name of	package with extension
    Tyler Roscoe 
    tyler at cryptio.net
       
    Fri Jun 18 13:01:32 EDT 2010
    
    
  
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.
> > 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.
Thanks for your help, Eric.
tyler
    
    
More information about the CMake
mailing list