[CMake] Question regarding External Project add and VTK
Matthew Woehlke
mw_triad at users.sourceforge.net
Mon Jun 2 18:30:15 EDT 2014
On 2014-06-02 17:48, jmerkow wrote:
> I want to add VTK as an external project, but I have a few questions.
>
> Looking online at examples of other projects using vtk as an
> external project, many of them use a 'superbuild' style technique
> [...] they have some option to enable SuperBuild (or a seperate
> CMakeLists.txt file) then that adds all the external projects (i.e.
> vtk or itk), and finally they add their own project as an external
> project (obv with superbuild turned off). I am wondering why this is
> done this way..
I think the answer is that you otherwise get into a chicken-and-egg
situation. Basically, your own project can't configure until VTK is
available; therefore, it is necessary to make configuration of your own
project be done as a build step that can depend on the build of VTK,
which is what the above pattern achieves.
--
Matthew
More information about the CMake
mailing list