[CMake] Add search paths for FIND_PACKAGE ?

David Cole david.cole at kitware.com
Mon Nov 19 13:56:45 EST 2007


So for the specific case you ask about, FindCURL.cmake, you would set the
following advanced variables during ccmake / CMakeSetup configure through
the cmake GUI:CURL_INCLUDE_DIR
CURL_LIBRARY

Then, with those set, the next FIND_PACKAGE(CURL) will "find" CURL because
you've told it exactly where it is.

If you do it all with cmake without a GUI, then you would specify those
variables on the first cmake command line with -D.


Does that help?
David



On 11/19/07, Stephen Collyer <scollyer at netspinner.co.uk> wrote:
>
> David Cole wrote:
> > What is wrong with explicitly specifying the non-standard locations up
> front
> > so that FIND_PACKAGE has nothing to do?
>
> You assume that I considered it all. In fact, I'm far too clueless
> about cmake to have done that.
>
> > In other words, prime all the relevant cache variables with the
> non-standard
> > locations.
>
> You mean the CMAKE_SYSTEM_INCLUDE_PATH variables ? So I'd set these
> via something like:
>
> cmake -DCMAKE_SYSTEM_INCLUDE_PATH=/som/where ...
>
> so that it ends up in the cache file ? Or are you talking about
> something completely different.
>
> > Are there specific packages you are having difficulty with?
>
> I have a development version  of libcurl which has a directory
> structure like:
>
> curl/libcurl.dll
> curl/include/curl/*.h
>
> This isn't found by FindCURL.cmake due to the extra
> include dir.
>
> --
> Regards
>
> Steve Collyer
> Netspinner Ltd
> _______________________________________________
> CMake mailing list
> CMake at cmake.org
> http://www.cmake.org/mailman/listinfo/cmake
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://public.kitware.com/pipermail/cmake/attachments/20071119/d7ac206d/attachment.html


More information about the CMake mailing list