Merge topic 'find_library-per-arch-lib-with-sysroot'

e74fba3d9c find_library: Search per-arch lib directories when compiling with sysroot

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !9614
This commit is contained in:
Brad King
2024-06-24 13:29:24 +00:00
committed by Kitware Robot

View File

@@ -84,7 +84,7 @@ include(Platform/UnixPaths)
# Debian has lib32 and lib64 paths only for compatibility so they should not be
# searched.
if(NOT CMAKE_CROSSCOMPILING)
if(NOT CMAKE_CROSSCOMPILING AND NOT CMAKE_COMPILER_SYSROOT)
if (EXISTS "/etc/debian_version")
set_property(GLOBAL PROPERTY FIND_LIBRARY_USE_LIB32_PATHS FALSE)
set_property(GLOBAL PROPERTY FIND_LIBRARY_USE_LIB64_PATHS FALSE)