[CMake] ExternalProject_Add examples

Yngve Inntjore Levinsen yngve.levinsen at gmail.com
Mon Oct 28 05:05:02 EDT 2013


Den 17. mars 2012 22:03, skrev Bill Lorensen:
> Folks,
>
> I've recently created a number of super builds using CMake's External
> Project mechanism. Each external project requires some sort of
> download, configuration, build and possibly install. The CMake defines
> needed to correctly access the results of the external project vary
> significantly. The trickiest part is find the proper download,
> configuration and CMake defines.
>
> For example, for the Point Cloud Library (http://pointclouds.org/) I
> created these external projects:
> VTK - git, cmake, make; VTK_DIR
> FLANN - zip, cmake, make install; FLANN_LIBRARY, FLANN_INCUDE_DIR
> Eigen - .tar.bz2,; EIGEN_INCLUDE_DIR
> Qhull - git, cmake, make;QHULL_LIBRARY,QHULL_INCLUDE_DIR
> Boost - .tar.gz, bootstrap.sh, b2; BOOST_ROOT
> GTest - .zip, cmake, make; GTEST_ROOT,GTEST_INCLUDE_DIR
>
> Slicer4 has many more.
>
> Should we start collecting sample ExternalProject_Add files for
> external projects?
>
> Bill

Hi,

For what it's worth, I would also mention a larger superbuild project at
CERN called LCGsoft:
http://svnweb.cern.ch/world/wsvn/lcgsoft/trunk/lcgcmake/

They built macros on top of ExternalProject_Add, see
cmake/modules/lcgsoft-macros.cmake. Maybe some parts of this design are
interesting to you. I have never used this myself, so I don't know the
details.

Cheers,
Yngve


More information about the CMake mailing list