[CMake] ExternalProjects_Add limitations

Bill Hoffman bill.hoffman at kitware.com
Mon Jan 6 10:27:57 EST 2014


On 1/6/2014 10:05 AM, Bill Hoffman wrote:
>>
> There is not a good way to make this work.  Everything HAS to be
> external project including your project.  You have a couple of options:
>
> 1. leave it with your project as an external project along with the
> other depends.  Then instruct your developers to use this to build the
> project the first time.  After that they should be able to open your
> project directly in the IDE and all will look normal.
>
>
> 2. Break it into two parts:
>     - your projects depends
>     - your project
>
>    Have your project find the projectdepends project and get all the
> find stuff to work that way.
I did this for one project:

project_third_party   - a set of external projects for all 3rd party stuff
myproject - regular cmake project uses find_* stuff for 3rd party stuff
myproject_bootstrap - an external project that builds 
project_third_party and myproject it has options to use system versions 
of 3rd party stuff, and configures project_third_party to reflect those 
options.

The idea is developers configure and build the bootstrap once.  After 
that they use the myproject configured and built by the boostrap 
process. The boostrap external project allows for the specification of 
source and build tree names for myproject.

-Bill



More information about the CMake mailing list