diff options
author | Alexander Neundorf <neundorf@kde.org> | 2007-08-20 12:49:21 (GMT) |
---|---|---|
committer | Alexander Neundorf <neundorf@kde.org> | 2007-08-20 12:49:21 (GMT) |
commit | 9d456389884584eb79e0d3254c162bdd7935fafa (patch) | |
tree | 95be9d8aff8d37d60b8e67011f975b38d3dc5a7a /Source/cmFindPackageCommand.cxx | |
parent | 129a3e9f9e7ac92109aa342c84916335b3a121f9 (diff) | |
download | CMake-9d456389884584eb79e0d3254c162bdd7935fafa.zip CMake-9d456389884584eb79e0d3254c162bdd7935fafa.tar.gz CMake-9d456389884584eb79e0d3254c162bdd7935fafa.tar.bz2 |
ENH: also process "~" and paths relative to CMAKE_CURRENT_SOURCE_DIR in Foo_DIR
Alex
Diffstat (limited to 'Source/cmFindPackageCommand.cxx')
-rw-r--r-- | Source/cmFindPackageCommand.cxx | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/Source/cmFindPackageCommand.cxx b/Source/cmFindPackageCommand.cxx index de177e8..8e30cd4 100644 --- a/Source/cmFindPackageCommand.cxx +++ b/Source/cmFindPackageCommand.cxx @@ -186,8 +186,15 @@ bool cmFindPackageCommand::InitialPass(std::vector<std::string> const& args) if(!cmSystemTools::IsOff(def)) { std::string f = def; + cmSystemTools::ConvertToUnixSlashes(f); f += "/"; f += this->Config; + if(!cmSystemTools::FileIsFullPath(f.c_str())) + { + f = "/" + f; + f = this->Makefile->GetCurrentDirectory() + f; + } + if(cmSystemTools::FileExists(f.c_str())) { if(this->ReadListFile(f.c_str())) |