[CMake] Find_Path problem

Eric NOULARD eric.noulard at gmail.com
Wed Oct 22 15:44:41 EDT 2008


Le Wed, 22 Oct 2008 20:33:15 +0200,
Wilfried Holzke <cmake at holzke.net> a écrit :

> Hi,
> 
> I have an library header file in
> "/usr/include/libNAME-version/libNAME/name.h" and want to find the
> path.
> 
> I tried
> 
> FIND_PATH(INC_PATH libNAME/name.h /usr/include/libNAME-*/)
> 
> as INC_PATH I get "/usr/include/libNAME-version/libNAME/"
> 
> but I only need "/usr/include/libNAME-version/".

You may try:
 
get_filename_component(WANTED_PATH ${INC_PATH} PATH)


-- 
Erk


More information about the CMake mailing list