Browse Source

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 <[email protected]>
Merge-request: !9614
Brad King 1 year ago
parent
commit
05b4883bfe
1 changed files with 1 additions and 1 deletions
  1. 1 1
      Modules/Platform/Linux.cmake

+ 1 - 1
Modules/Platform/Linux.cmake

@@ -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)