[CMake] Getting CHECK_FUNCTION_EXISTS to search in external
directories
Hendrik Sattler
post at hendrik-sattler.de
Sat Dec 22 16:40:01 EST 2007
Am Samstag 22 Dezember 2007 schrieb Albert Chin:
> I have the following:
> SET(CMAKE_REQUIRED_LIBRARIES "-lfreetype")
> CHECK_FUNCTION_EXISTS(FT_Get_First_Char HAVE_FREETYPE_FIRST)
> CHECK_FUNCTION_EXISTS(FT_Get_Next_Char HAVE_FREETYPE_NEXT)
> SET(CMAKE_REQUIRED_LIBRARIES)
>
> This correctly searches for FT_Get_First_Char and FT_Get_Next_Char in
> -lfreetype. But, how do I get CHECK_FUNCTION_EXISTS to add -L paths in
> the event -lfreetype is in a non-default directory (like
> /opt/freetype/lib)?
By using find_library() first.
HS
More information about the CMake
mailing list