ExternalProject_Add when only build external libs and when build-install

Hi,

ExternalProject_Add allows build and install libraries.
I experiment with it and as an example I use Slicer 3D. I can see that Slicer builds some libs and other libs Slicer builds-install.

What is the logic behind that? When usually developpers use ExternalProject_Add to simply build and when to build-install libraries?

As for me I’m trying understand do I need to build or build-install Eigen3 (header only) via ExternalProject_Add?

The general rule of thumb is that projects should either be all-ExternalProject or no ExternalProject. Mixing just leads to sadness down the road.

@jcfr do you have insight into the current state of Slicer 3D’s usage of ExternalProject?

Cc: @craig.scott

Thank you for the rule of thumb, I didn’t know about that.

Slicer is a big project but I think I have some understanding how Slicer works and uses External projects (usually with find_package() function).

In the picture below you can see build folder of Slicer’s external projects. You can see that some libs are installed and other are simly built:

I don’t know what makes DCMTK so different. I suspect that might be because it uses a shared install directory somewhere, but I think Slicer developers are better positioned to answer.

1 Like