[CMake] change where package is generated; full name of package with extension
David Cole
david.cole at kitware.com
Fri Jun 18 13:06:46 EDT 2010
On Fri, Jun 18, 2010 at 1:01 PM, Tyler Roscoe <tyler at cryptio.net> wrote:
> 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 you could make a "build-products-done" custom target, and then use
add_dependencies with that and all the other "real" CMake targets that you
have to make it go last after all the real stuff is built.
Then you can add another custom target to do as much 'make package' type
stuff as you want and make it depend on the "build-products-done" custom
target...
Because to do what you want, you want multiple make package steps anyhow,
right?
HTH,
David
> > > 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
> _______________________________________________
> Powered by www.kitware.com
>
> Visit other Kitware open-source projects at
> http://www.kitware.com/opensource/opensource.html
>
> Please keep messages on-topic and check the CMake FAQ at:
> http://www.cmake.org/Wiki/CMake_FAQ
>
> Follow this link to subscribe/unsubscribe:
> http://www.cmake.org/mailman/listinfo/cmake
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.cmake.org/pipermail/cmake/attachments/20100618/60cb9ace/attachment.htm>
More information about the CMake
mailing list