summaryrefslogtreecommitdiffstats
path: root/Source
diff options
context:
space:
mode:
Diffstat (limited to 'Source')
-rw-r--r--Source/cmFindLibraryCommand.cxx10
-rw-r--r--Source/cmake.cxx7
2 files changed, 15 insertions, 2 deletions
diff --git a/Source/cmFindLibraryCommand.cxx b/Source/cmFindLibraryCommand.cxx
index c57e8d8..5fcf089 100644
--- a/Source/cmFindLibraryCommand.cxx
+++ b/Source/cmFindLibraryCommand.cxx
@@ -67,8 +67,14 @@ bool cmFindLibraryCommand::InitialPass(std::vector<std::string> const& argsIn)
}
return true;
}
- // add special 64 bit paths if this is a 64 bit compile.
- this->AddLib64Paths();
+
+ if(this->Makefile->GetCMakeInstance()
+ ->GetPropertyAsBool("FIND_LIBRARY_USE_LIB64_PATHS"))
+ {
+ // add special 64 bit paths if this is a 64 bit compile.
+ this->AddLib64Paths();
+ }
+
std::string library;
for(std::vector<std::string>::iterator i = this->Names.begin();
i != this->Names.end() ; ++i)
diff --git a/Source/cmake.cxx b/Source/cmake.cxx
index b6efa10..7bec758 100644
--- a/Source/cmake.cxx
+++ b/Source/cmake.cxx
@@ -2940,6 +2940,13 @@ void cmake::DefineProperties(cmake *cm)
"platform supports shared libraries. Basically all current general "
"general purpose OS do so, the exception are usually embedded systems "
"with no or special OSs.");
+ cm->DefineProperty
+ ("FIND_LIBRARY_USE_LIB64_PATHS", cmProperty::GLOBAL,
+ "Whether FIND_LIBRARY should automatically search lib64 directories.",
+ "FIND_LIBRARY_USE_LIB64_PATHS is a boolean specifying whether the "
+ "FIND_LIBRARY command should automatically search the lib64 variant of "
+ "directories called lib in the search path when building 64-bit "
+ "binaries.");
}