[CMake] CPack and building installers for sub-projects
Eric Noulard
eric.noulard at gmail.com
Fri Apr 1 16:38:58 EDT 2011
2011/4/1 Crni Gorac <cgorac at gmail.com>:
>
> Thanks for replies. I'm using CMake 2.8.4, and for this particular
> project - it's mostly about PackageMaker and NSIS installers (for Mac
> and Windows, respectively). Also, CPack components stuff is really
> not usable here, these are two projects with completely separate
> target audience, but sharing lots of the underlying implementation
> through this library of common code.
Ok I understand.
> @Clinton: Care to explain the setup you mentioned (with multiple CPack
> config files) in more details?
>
> Also: if CPack not supporting the setup I've described, and if I just
> split the whole thing into three different projects, what would be the
> best approach with CMake to assure that common library get built when
> building any of projects depending on it? Or developer just have to
> remember to build the library manually first, and then these two
> projects?
May using ExternalProject_Add in each project
would do the job.
(see cmake --help-module ExternalProject)
The main drawback would be the fact that each project will have its own
copy of the common lib, or may be they could share it I don't know.
Have a look at the mailing list archive about ExternalProject_Add usage
I think there have been discussion about that lately and I'm not currently
using ExternalProject_Add so I may be mistaken.
--
Erk
Membre de l'April - « promouvoir et défendre le logiciel libre » -
http://www.april.org
More information about the CMake
mailing list