On 3/26/2012 1:35 PM, Rolf Eike Beer wrote:
Well, that is in fact an interesting question. If "/usr" is in the default paths list and "lib" is a default suffix, will specifying "fltk2" as suffix result in /usr, /usr/lib, and /usr/fltk2, or will also /usr/lib/fltk2 be searched. The latter would mean that the default and specified suffixes are different lists, so specifying lib again there should in theory also search in lib/lib.
It's the latter so find_library with PATH_SUFFIXES "lib" searches lib/lib. When find_library adds "lib" and find_path adds "include" and find_program adds "bin" that is not the same as PATH_SUFFIXES. They are just documented by each command as paths searched under each prefix in CMAKE_PREFIX_PATH and CMAKE_SYSTEM_PREFIX_PATH. They are not even a list. It is just what each command does. After all that is done then PATH_SUFFIXES values are added to the results independent of how they were generated. -Brad -- Powered by www.kitware.com Visit other Kitware open-source projects at http://www.kitware.com/opensource/opensource.html Please keep messages on-topic and check the CMake FAQ at: http://www.cmake.org/Wiki/CMake_FAQ Follow this link to subscribe/unsubscribe: http://public.kitware.com/cgi-bin/mailman/listinfo/cmake-developers