[CMake] cpack, both debug and release in win32

David Cole david.cole at kitware.com
Wed Apr 29 07:16:26 EDT 2009


Are you using Visual Studio on Windows?
Do you care if the solution is portable to other build systems?

What you want to do is possible, but probably not very easy.

The problem is that CMake assumes you will build/install/package everything
for either a Debug build or a Release build. (In make file based generators,
the whole build tree is assumed to be one or the other. In VS and Xcode
based generators, the build tree can contain multiple, but independent
configurations simultaneously.)

So to come up with a portable solution, you'd have to do something like:
build Debug
build Release
(these would be in separate binary directories for make file based systems)
create a make install tree that is able to include both Debug and Release
bits and pieces
create an installer package based on that make install tree

It's going to be a lot of manual work and making assumptions or defining
conventions for yourself so that you can get both Debug and Release stuff
working across multiple cmake generator types.

If you already have the install target putting Debug and Release files into
the same tree, then you could just write a custom packaging step to take
that tree and make it into an installer rather than using the default stuff
that CPack does for you. That would probably be the easiest route if you
have "install" working already.


HTH,
David



On Wed, Apr 29, 2009 at 3:11 AM, Anders Backman <andersb at cs.umu.se> wrote:

> When using INSTALL its possible to first build with release and then debug
> into the same target directory, but with PACKAGE this is not possible.
> First I build with release I get only release libraries into an installer
> (running under windows using NSIS)
> second, if I build with debug, I get a new one, with only debug.
>
> Is there something I can do with the INSTALL command to get both
> libraries/apps to be packaged into the same pack?
>
> On Tue, Apr 28, 2009 at 7:23 PM, Anders Backman <andersb at cs.umu.se> wrote:
>
>> Is it possible (and if so how) to use Cpack and create a package with
>> files both  from Debug and Release under windows?
>>
>> /A
>
>
>
>
>
> _______________________________________________
> 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/20090429/40411f44/attachment.htm>


More information about the CMake mailing list