[CMake] Appending to LIBRARY search path.

Brad King brad.king at kitware.com
Mon May 16 13:26:09 EDT 2005


Shishir Ramam wrote:
> Is there a way to append path variables to the default library search path?
> 
> For example if I use FIND_LIBRARY this'll give me the fully qualified filename. 
> I'd like to use the path element of this and append it to the default library 
> search path. 

Once the first library is found you can use GET_FILENAME_COMPONENT to 
get the directory portion.  Then just add that to a variable that lists 
paths used in future searches:

FIND_LIBRARY(FOO NAMES foo PATHS ... ${MY_LIB_SEARCH_PATH})

-Brad


More information about the CMake mailing list