summaryrefslogtreecommitdiffstats
path: root/Source/cmFindPackageCommand.cxx
diff options
context:
space:
mode:
authorAlexander Neundorf <neundorf@kde.org>2007-08-20 12:49:21 (GMT)
committerAlexander Neundorf <neundorf@kde.org>2007-08-20 12:49:21 (GMT)
commit9d456389884584eb79e0d3254c162bdd7935fafa (patch)
tree95be9d8aff8d37d60b8e67011f975b38d3dc5a7a /Source/cmFindPackageCommand.cxx
parent129a3e9f9e7ac92109aa342c84916335b3a121f9 (diff)
downloadCMake-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.cxx7
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()))