mirror of
https://github.com/Kitware/CMake.git
synced 2026-01-06 05:40:54 -06:00
Teach find_library and find_package to search lib32 paths (#11260)
Add a ``FIND_LIBRARY_USE_LIB32_PATHS`` global property analogous to the ``FIND_LIBRARY_USE_LIB64_PATHS`` property. This helps find commands on multilib systems that use ``lib32`` directories and either do not have ``lib`` symlinks or point ``lib`` to ``lib64``.
This commit is contained in:
committed by
Brad King
parent
c5d71b28ec
commit
896ad251de
@@ -40,11 +40,10 @@ bool cmFindLibraryCommand::InitialPass(std::vector<std::string> const& argsIn,
|
||||
return true;
|
||||
}
|
||||
|
||||
if (const char* abi_name =
|
||||
this->Makefile->GetDefinition("CMAKE_INTERNAL_PLATFORM_ABI")) {
|
||||
std::string abi = abi_name;
|
||||
if (abi.find("ELF N32") != abi.npos) {
|
||||
// Convert lib to lib32.
|
||||
if (this->Makefile->GetState()->GetGlobalPropertyAsBool(
|
||||
"FIND_LIBRARY_USE_LIB32_PATHS")) {
|
||||
// add special 32 bit paths if this is a 32 bit compile.
|
||||
if (this->Makefile->PlatformIs32Bit()) {
|
||||
this->AddArchitecturePaths("32");
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user