diff options
author | Steven Newbury <steve@snewbury.org.uk> | 2017-02-27 21:06:51 (GMT) |
---|---|---|
committer | Brad King <brad.king@kitware.com> | 2017-03-07 20:22:55 (GMT) |
commit | 462cf254270fbd56bffc73b00dc28882fdb0bdd6 (patch) | |
tree | ff0ebb25613ba68d21b9b50f60f1f53f2ea05d79 /Source/cmFindPackageCommand.cxx | |
parent | 06ef23c3e0abf79f451cf69fbd3ac646b7e17c27 (diff) | |
download | CMake-462cf254270fbd56bffc73b00dc28882fdb0bdd6.zip CMake-462cf254270fbd56bffc73b00dc28882fdb0bdd6.tar.gz CMake-462cf254270fbd56bffc73b00dc28882fdb0bdd6.tar.bz2 |
Add support for x32-abi
Detect x32-abi through CMakeCompilerABI infrastruture and use this
information at runtime to determine the correct library paths with
`FIND_LIBRARY_USE_LIBX32_PATHS`.
Fixes: #15994
Diffstat (limited to 'Source/cmFindPackageCommand.cxx')
-rw-r--r-- | Source/cmFindPackageCommand.cxx | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/Source/cmFindPackageCommand.cxx b/Source/cmFindPackageCommand.cxx index 60de74f..4b29837 100644 --- a/Source/cmFindPackageCommand.cxx +++ b/Source/cmFindPackageCommand.cxx @@ -92,6 +92,7 @@ cmFindPackageCommand::cmFindPackageCommand() this->DebugMode = false; this->UseLib32Paths = false; this->UseLib64Paths = false; + this->UseLibx32Paths = false; this->PolicyScope = true; this->VersionMajor = 0; this->VersionMinor = 0; @@ -173,6 +174,13 @@ bool cmFindPackageCommand::InitialPass(std::vector<std::string> const& args, this->UseLib64Paths = true; } + // Lookup whether libx32 paths should be used. + if (this->Makefile->PlatformIsx32() && + this->Makefile->GetState()->GetGlobalPropertyAsBool( + "FIND_LIBRARY_USE_LIBX32_PATHS")) { + this->UseLibx32Paths = true; + } + // Check if User Package Registry should be disabled if (this->Makefile->IsOn("CMAKE_FIND_PACKAGE_NO_PACKAGE_REGISTRY")) { this->NoUserRegistry = true; @@ -2002,6 +2010,9 @@ bool cmFindPackageCommand::SearchPrefix(std::string const& prefix_in) if (this->UseLib64Paths) { common.push_back("lib64"); } + if (this->UseLibx32Paths) { + common.push_back("libx32"); + } common.push_back("lib"); common.push_back("share"); |