diff options
author | Pablo Romero <pablorcum@gmail.com> | 2021-09-07 16:10:08 (GMT) |
---|---|---|
committer | Brad King <brad.king@kitware.com> | 2021-09-09 19:55:26 (GMT) |
commit | 8defe3380e4656e4239877a0cd89607c36bf0ac7 (patch) | |
tree | 9bc2c43c2be2f124a2da0a9e883607b89deb5fb6 | |
parent | ce6820fe215b8257bff7dc30fe5c57d8210adb09 (diff) | |
download | CMake-8defe3380e4656e4239877a0cd89607c36bf0ac7.zip CMake-8defe3380e4656e4239877a0cd89607c36bf0ac7.tar.gz CMake-8defe3380e4656e4239877a0cd89607c36bf0ac7.tar.bz2 |
CMakeFindPackageMode: Honor CMAKE_SYSROOT to detect lib64 platforms
Add `CMAKE_SYSROOT` to check the full path on host OS. In a
non-crosscompiling use case, the call to `CMAKE_SYSROOT` is empty.
Fixes: #22608
-rw-r--r-- | Modules/CMakeFindPackageMode.cmake | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/Modules/CMakeFindPackageMode.cmake b/Modules/CMakeFindPackageMode.cmake index 815dfc9..726e2a2 100644 --- a/Modules/CMakeFindPackageMode.cmake +++ b/Modules/CMakeFindPackageMode.cmake @@ -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: |