[CMake] Getting CHECK_FUNCTION_EXISTS to search in external directories

Albert Chin cmake at mlists.thewrittenword.com
Sat Dec 22 15:51:27 EST 2007


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)?

-- 
albert chin (china at thewrittenword.com)


More information about the CMake mailing list