Merge topic 'CMakeFindPackageMode-sysroot'

8defe3380e CMakeFindPackageMode: Honor CMAKE_SYSROOT to detect lib64 platforms

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !6513
This commit is contained in:
Brad King
2021-09-14 13:33:35 +00:00
committed by Kitware Robot

View File

@@ -78,7 +78,7 @@ if(UNIX)
# from the outside
if(NOT CMAKE_SIZEOF_VOID_P)
set(CMAKE_SIZEOF_VOID_P 4)
if(EXISTS /usr/lib64)
if(EXISTS ${CMAKE_SYSROOT}/usr/lib64)
set(CMAKE_SIZEOF_VOID_P 8)
else()
# use the file utility to check whether itself is 64 bit: