[CMake] CPack and building installers for sub-projects

Crni Gorac cgorac at gmail.com
Fri Apr 1 12:06:21 EDT 2011


Am working with seemingly not too complicated CMake setup: Have two
projects, say Foo and Bar, both dependent from the library libBaz;
actually at the beginning there was only Foo project, and now there is
Bar project, and common code is refactored into libBaz library.  All
three of these are into own subdirectories, and I have top-level
CMakeLists.txt, that practically contains only references to each of
these subdirectories.  The libBaz library is built statically and
linked this way into both Foo and Bar projects, so it all works in
rather simple manner.  However, now I'm faced with creating CPack
installers for both Foo and Baz - more precisely, there already exists
CPack based installer for Foo that also works great, and now I'm
looking into building same kind of installer for Bar.  I've looked
through the list and such, but it seems that it is not possible to
have two installers generated from single CMake source tree.  So -
what would be recommended approach to handle this sort of setup then?

Thanks.


More information about the CMake mailing list