[cmake-developers] The lib64 case

Brad King brad.king at kitware.com
Mon Mar 26 13:49:02 EDT 2012


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



More information about the cmake-developers mailing list