[CMake] find_package() vs ExternalProject_Add()

Zaak Beekman zbeekman at gmail.com
Thu May 8 18:34:10 EDT 2014


Am I correct in stating that ExternalProject_Add() cannot completely
replace find_package()?

e.g. if I point ExternalProject_Add() to download a software package
(which uses a CMake build system and exports its targets and provides
a <package>-config.cmake file) the only thing this does is to provide
a target to download, patch, build, test, install the software in
question, yes? It doesn't look for any <project>-config.cmake file, to
help setup include dirs, etc., correct?

So if a project providing a config.cmake file is downloaded, built
etc. with ExternalProject_Add one still needs to then have
find_package() to know what include directories need to be added etc.
unless I am missing something.

Clarification much appreciated.

Thanks,
Izaak Beekman
===================================
(301)244-9367
Princeton University Doctoral Candidate
Mechanical and Aerospace Engineering
ibeekman at princeton.edu

UMD-CP Visiting Graduate Student
Aerospace Engineering
ibeekman at umiacs.umd.edu
ibeekman at umd.edu


More information about the CMake mailing list