[CMake] Find_Path problem
Timenkov Yuri
ytimenkov at gmail.com
Thu Oct 23 14:43:19 EDT 2008
may be this can work too:
file(glob find_paths /usr/include/libNAME-*)
find_path(INC_PATH NAMES libName/name.h PATHS ${find_paths})
On 10/23/08, Wilfried Holzke <cmake at holzke.net> wrote:
> 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)
>
> Works. Thanks.
>
> regards
>
> W. Holzke
> _______________________________________________
> CMake mailing list
> CMake at cmake.org
> http://www.cmake.org/mailman/listinfo/cmake
>
More information about the CMake
mailing list