[CMake] ExternalProject_Add: directing cmake to a different <path-to-source>

Neil Carlson neil.n.carlson at gmail.com
Sat Feb 7 23:14:47 EST 2015


I'm trying to get ExternalProject_Add to build a TPL that doesn't have a
CMakeLists.txt file in the top-level directory.  The TPL untars as
foo/{A,B} where A and B each contain a CMakeLists.txt file and are
independent of each other.  I only want to build "A" and would like to have
cmake run with "foo/A" as the <path-to-source>.  Unfortunately I can't seem
to manage it. The tar file is unpacked with ${SOURCE_DIR} as its root, and
that same directory is used as the <path-to-source> for the cmake command
-- I want ${SOURCE_DIR}/A.  Any suggestions on how to make ExternalProject
do what I want?  Clearly I can just repackage the tar file, but I'd rather
use the pristine tar file if I can.

Thanks
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://public.kitware.com/pipermail/cmake/attachments/20150207/ae6bc552/attachment.html>


More information about the CMake mailing list