Skip to content

find_library: Skip 'lib => lib<arch>' searches if one symlinks the other

Brad King requested to merge brad.king/cmake:find-libarch-not-symlink into master

The FIND_LIBRARY_USE_LIB32_PATHSand FIND_LIBRARY_USE_LIB64_PATHS global properties ask find_library to look in lib<arch> directories automatically before corresponding lib directories. However, if lib<arch> is just a symlink to lib (or vice-versa) then we should skip adding the lib<arch> path. Such symlinks typically only exist to satisfy software that expects the lib<arch> path to be available.

Fixes: #16687 (closed)

Merge request reports