[CMake] Error: XXX is not set. It must be set .... XXXConfig.cmake

ope ope-devel at gmx.de
Sun Jul 15 14:03:47 EDT 2007


> the following error occoured with the entries in my CMakeList.txt
> 
> find_package(Curl REQUIRED)
> include_directories(${Curl_INCLUDE_DIR})
> link_directories(${Curl_LIBRARIES})
> 
> with cmake CURL_DIR="/usr"
> 
> CMake Error: Curl_DIR is not set.  It must be set to the directory
> containing CurlConfig.cmake in order to use Curl.
> 
> The same with zlib. What is wrong here?

At first thanks to all answers here!

It seems, that find_package is case sensitive here! Using, e.g.

find_package(ZLIB REQUIRED)
find_package(CURL REQUIRED)

works, even if the "REQUIRED" keyword is ignored for curl.

The documentation should explain when case-sensitive matters and not;
some self written (templated by cmake's FindXXX) FindXXX works case
in-sensitive. Even that not all by cmake distributed Modules take care
on the "REQUIRED" keyword and Versions etc obviously.

Regards,
Olaf

BTW, the reply button points to the op, not to cmake's mailing list;
therefore many replays bypass the mailing list. Is there an option to
the mailing list manager (reply-address?)?



More information about the CMake mailing list