[CMake] Find preferentially in /usr/local/lib not working

Stephen Collyer scollyer at netspinner.co.uk
Fri Mar 28 06:17:03 EDT 2008


Stephen Collyer wrote:
> I'm trying to change some find* modules to prefer /usr/local/lib
> over /usr/lib and I can't get it to work. I have, for example:
> 
>> FIND_PATH(CURL_INCLUDE_DIR                                                      
>>     NAMES 
>>       curl/curl.h
>>     PATHS
>>       /usr/local/include                                                        
>>       /usr/include
>> ) 
> 
> but this sets CURL_INCLUDE_DIR to /usr/include even though I have
> a curl/curl.h in /usr/local/include.
> 
> Can someone tell me what I'm doing wrong here ?

I've also tried setting CMAKE_INCLUDE_PATH and CMAKE_LIB_PATH
explicitly like this:

>   SET(CMAKE_LIBRARY_PATH /usr/local/lib)
>   SET(CMAKE_INCLUDE_PATH /usr/local/include)      

but this makes no difference either. CMake is still finding
the versions in /usr/include and /usr/lib.

-- 
Regards

Steve Collyer
Netspinner Ltd


More information about the CMake mailing list