[CMake] How to set libcurl library path and the library name?

Rolf Eike Beer eike at sf-mail.de
Fri Apr 28 01:25:32 EDT 2017


Alex Chen wrote:
> There is an error in the FindCURL document of Cmake 3.8 (or prior versions).

No.

> It says
> 
> CURL_INCLUDE_DIRS   - where to find curl/curl.h, etc.

Which is what it is _setting_.

> But in fact it is looking for CURL_INCLUDE_DIR, not CURL_INCLUDE_DIRS.  If I
> set –DCURL_INCLUDE_DIRS, cmake cannot find libcurl’s header files.

This is correct, it is _looking_ for the singular form, and then putting it in 
the plural one, like basically all modules do. This has the reason that 
sometimes you need multiple include dirs, but you can't properly store that in 
one cache variable (you need to know which one was actually not found on next 
run).

Eike
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 181 bytes
Desc: This is a digitally signed message part.
URL: <http://public.kitware.com/pipermail/cmake/attachments/20170428/787ae887/attachment.sig>


More information about the CMake mailing list