diff options
author | Letu Ren <fantasquex@gmail.com> | 2022-10-30 09:07:18 (GMT) |
---|---|---|
committer | Brad King <brad.king@kitware.com> | 2022-10-30 12:52:59 (GMT) |
commit | 988b9928e46f22d4e51cfe259991c9c5378bc24b (patch) | |
tree | 1ef46d093c5e028c4a7bcb27a3ab8593b51d7141 /Modules | |
parent | 59ae2543165b836d01b88fe0ba4e22ecd549e239 (diff) | |
download | CMake-988b9928e46f22d4e51cfe259991c9c5378bc24b.zip CMake-988b9928e46f22d4e51cfe259991c9c5378bc24b.tar.gz CMake-988b9928e46f22d4e51cfe259991c9c5378bc24b.tar.bz2 |
Linux: Avoid finding libraries using lib64 on ArchLinux
ArchLinux uses `/lib` for 64-bit libraries and there is no `/lib64`.
However, unlike Debian, 32-bit libraries are in `/lib32`.
Diffstat (limited to 'Modules')
-rw-r--r-- | Modules/Platform/Linux.cmake | 11 |
1 files changed, 8 insertions, 3 deletions
diff --git a/Modules/Platform/Linux.cmake b/Modules/Platform/Linux.cmake index e3d444e..3dc3ca3 100644 --- a/Modules/Platform/Linux.cmake +++ b/Modules/Platform/Linux.cmake @@ -87,7 +87,12 @@ include(Platform/UnixPaths) # Debian has lib32 and lib64 paths only for compatibility so they should not be # searched. -if(NOT CMAKE_CROSSCOMPILING AND EXISTS "/etc/debian_version") - set_property(GLOBAL PROPERTY FIND_LIBRARY_USE_LIB32_PATHS FALSE) - set_property(GLOBAL PROPERTY FIND_LIBRARY_USE_LIB64_PATHS FALSE) +if(NOT CMAKE_CROSSCOMPILING) + 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) + endif() + if (EXISTS "/etc/arch-release") + set_property(GLOBAL PROPERTY FIND_LIBRARY_USE_LIB64_PATHS FALSE) + endif() endif() |