[CMake] Configuring targets & software that isn't yet built

Richard Offer richard at whitequeen.com
Tue Jul 20 16:21:27 EDT 2010



I have two targets (libssh2 and curl). Curl wants to know if libssh2 is
installed during its configuration step.

Of course it isn¹t at that point.

I tried a naïve approach ­ adding a variable that curl uses to see if
libssh2 is available (HAVE_LIBSSH2_H) into the cache.

SET( HAVE_LIBSSH2_H 1 CACHE INTERNAL  "We build libssh2 so tell curl it
(will be)  here." )

But surprisingly it broke all subsequent configuration searches.

(curl is currently in a subdirectory of libssh2)


Is there  a clean way to handle the scenario ­ configuring software that
depends on another target¹s output ?


Richard.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.cmake.org/pipermail/cmake/attachments/20100720/edc67fd8/attachment.htm>


More information about the CMake mailing list