[cmake-developers] The lib64 case
Rolf Eike Beer
eike at sf-mail.de
Mon Mar 26 10:00:21 EDT 2012
Am Montag, 26. März 2012, 08:52:59 schrieb Brad King:
> On 3/26/2012 8:28 AM, Rolf Eike Beer wrote:
> >> The find_library command automatically searches "lib" under each path
> >> in CMAKE_SYSTEM_PREFIX_PATH and CMAKE_PREFIX_PATH. Any path that has
> >> "lib" in it will first be transformed to "lib64" when the above property
> >> is ON. Using "PATH_SUFFIXES lib64 lib" is not necessary to get lib64
> >> to be searched.
> >
> > Is this also true for everything passed in with PATHS or HINTS?
>
> Yes. The lib->lib64 translation is a special case in the find_library
> command. It occurs at the very end, even after PATH_SUFFIXES.
It == "lib is automatically appended". But from your answer below I guess it
is not happening to PATHS or HINTS.
> >>> Is same is true for find_path() and include suffix?
> >>
> >> There is no automatic translation to "include64". However the command
> >> will search "include" under each prefix as above so one does not need
> >> to write "PATH_SUFFIXES include" to search<prefix>/include with the
> >> find_path command.
> >
> > The question was just about the automatic appending, not include64 ;) So:
> > does it add everything in PATH_SUFFIXES (which automatically includes
> > "include") to paths specified by PATHS and HINTS?
>
> No. Each find command documents an ordered list of steps it follows
> to add search paths. A couple of them in find_path take the prefix
> paths and add "include" to each entry. Other steps add the HINTS
> and PATHS values. The PATH_SUFFIXES are added to all of them.
ok, I now have:
find_path(VAR header.h
HINTS /opt/p1
PATHS /opt/p2
PATH_SUFFIXES foo)
This would search in /usr/include, /usr/foo, /opt/p1/foo, /opt/p2/foo, but
neither in /opt/p1/include nor /opt/p2/include. Correct?
Eike
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 198 bytes
Desc: This is a digitally signed message part.
URL: <http://public.kitware.com/pipermail/cmake-developers/attachments/20120326/68e27619/attachment.sig>
More information about the cmake-developers
mailing list