On Saturday 29 October 2011, Renato Utsch wrote:
> Hello!
> 
> Well, I am currently using cURL for a project of mine, but on windows I
> can't find the cURL library only using the find_package(CURL) provided with
> CMake, although it works fine with linux.
> 
> So, I created a directory named "deps" in my source directory. How can I
> make the find_package to look at this directory before looking at the
> default directories? Like:
> 
> # Look firstly at the /deps directory, if finds the libcurl.a and the
> include/curl folder set the CURL_FOUND macro and the other ones that the
> find_package() automatically provides...

You can set CMAKE_PREFIX_PATH so that it looks first in that subdir and then 
in the default dirs:

set(CMAKE_PREFIX_PATH ${CMAKE_PREFIX_PATH} ${CMAKE_SOURCE_DIR}/deps/ )

find_package(curl)
...etc.

Alex
--

Powered by www.kitware.com

Visit other Kitware open-source projects at 
http://www.kitware.com/opensource/opensource.html

Please keep messages on-topic and check the CMake FAQ at: 
http://www.cmake.org/Wiki/CMake_FAQ

Follow this link to subscribe/unsubscribe:
http://www.cmake.org/mailman/listinfo/cmake

Reply via email to