[CMake] External projects and imported targets

Timothy M. Shead tshead at k-3d.com
Sun May 16 18:20:56 EDT 2010


On 05/16/2010 01:01 PM, Marcus D. Hanwell wrote:

> OK, may be others on the list may have other experiences they will
> share. After having spent quite a bit of time working on packaging for a
> Linux distro, and using CMake's external projects I see many parallels.
> 
> The external project allows us to establish inter-package dependencies,
> and from there build order. Traditional targets assume that project is
> building everything, or that it was already built and found. So two
> levels are necessary, and external projects allow us to do cross
> platform packaging for our particular projects.
> 
> I would certainly be interested in what others who have been using
> external project have found, but it seems to me that mixing external
> projects and traditional targets is unlikely to work well, at least with
> what is available to us right now.

I can think of several reasons to use External Projects: to target a
platform that doesn't have package management at all (Windows, OSX), to
target a platform that's missing a required package (Ubuntu doesn't have
package X), or to target a platform where a required package exists, but
isn't configured the way you want (Ubuntu has package X, but it was
built without feature Y that your package requires).  It's interesting
that all of these cases come back to packaging issues, and it's clear
that your packaging analogy provides a good framework for thinking about
how to best use External Projects.  In fact, all of these use cases
involve "usurping" work that would normally be done by distros.
Interesting way of looking at it.

Cheers,
Tim
-------------- next part --------------
A non-text attachment was scrubbed...
Name: tshead.vcf
Type: text/x-vcard
Size: 151 bytes
Desc: not available
URL: <http://www.cmake.org/pipermail/cmake/attachments/20100516/287c4bdf/attachment.vcf>


More information about the CMake mailing list