summaryrefslogtreecommitdiffstats
path: root/Source/cmFindPackageCommand.cxx
diff options
context:
space:
mode:
Diffstat (limited to 'Source/cmFindPackageCommand.cxx')
-rw-r--r--Source/cmFindPackageCommand.cxx11
1 files changed, 11 insertions, 0 deletions
diff --git a/Source/cmFindPackageCommand.cxx b/Source/cmFindPackageCommand.cxx
index 7908afe..1a44d73 100644
--- a/Source/cmFindPackageCommand.cxx
+++ b/Source/cmFindPackageCommand.cxx
@@ -43,6 +43,7 @@ cmFindPackageCommand::cmFindPackageCommand()
this->UseConfigFiles = true;
this->UseFindModules = true;
this->DebugMode = false;
+ this->UseLib32Paths = false;
this->UseLib64Paths = false;
this->PolicyScope = true;
this->VersionMajor = 0;
@@ -110,6 +111,13 @@ bool cmFindPackageCommand::InitialPass(std::vector<std::string> const& args,
this->LibraryArchitecture = arch;
}
+ // Lookup whether lib32 paths should be used.
+ if (this->Makefile->PlatformIs32Bit() &&
+ this->Makefile->GetState()->GetGlobalPropertyAsBool(
+ "FIND_LIBRARY_USE_LIB32_PATHS")) {
+ this->UseLib32Paths = true;
+ }
+
// Lookup whether lib64 paths should be used.
if (this->Makefile->PlatformIs64Bit() &&
this->Makefile->GetState()->GetGlobalPropertyAsBool(
@@ -1907,6 +1915,9 @@ bool cmFindPackageCommand::SearchPrefix(std::string const& prefix_in)
if (!this->LibraryArchitecture.empty()) {
common.push_back("lib/" + this->LibraryArchitecture);
}
+ if (this->UseLib32Paths) {
+ common.push_back("lib32");
+ }
if (this->UseLib64Paths) {
common.push_back("lib64");
}