find_library: Skip 'lib => lib<arch>' searches if one symlinks the other
The `FIND_LIBRARY_USE_LIB<arch>_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
Showing
- Source/cmFindLibraryCommand.cxx 22 additions, 0 deletionsSource/cmFindLibraryCommand.cxx
- Tests/RunCMake/find_library/LibArchLink-stderr.txt 2 additions, 0 deletionsTests/RunCMake/find_library/LibArchLink-stderr.txt
- Tests/RunCMake/find_library/LibArchLink.cmake 24 additions, 0 deletionsTests/RunCMake/find_library/LibArchLink.cmake
- Tests/RunCMake/find_library/RunCMakeTest.cmake 3 additions, 0 deletionsTests/RunCMake/find_library/RunCMakeTest.cmake
Please register or sign in to comment