summaryrefslogtreecommitdiffstats
path: root/Source/cmake.cxx
diff options
context:
space:
mode:
authorBill Hoffman <bill.hoffman@kitware.com>2001-06-21 21:25:35 (GMT)
committerBill Hoffman <bill.hoffman@kitware.com>2001-06-21 21:25:35 (GMT)
commit18b2449ca2c4113d1ebf80bf94dda384d643f1a8 (patch)
tree871ae648cf51dec5e106bac328ca294e584d69ec /Source/cmake.cxx
parent31ab42e5b7c7dfde2289dabe702e6d7bb2b9376d (diff)
downloadCMake-18b2449ca2c4113d1ebf80bf94dda384d643f1a8.zip
CMake-18b2449ca2c4113d1ebf80bf94dda384d643f1a8.tar.gz
CMake-18b2449ca2c4113d1ebf80bf94dda384d643f1a8.tar.bz2
ENH: clean up
Diffstat (limited to 'Source/cmake.cxx')
-rw-r--r--Source/cmake.cxx8
1 files changed, 5 insertions, 3 deletions
diff --git a/Source/cmake.cxx b/Source/cmake.cxx
index 44e6fce..52b5f12 100644
--- a/Source/cmake.cxx
+++ b/Source/cmake.cxx
@@ -188,7 +188,7 @@ void cmake::AddCMakePaths(const std::vector<std::string>& args)
#ifdef CMAKE_ROOT_DIR
else if (!cmSystemTools::FileExists(modules.c_str()))
{
- // try compiled in value on UNIX
+ // try compiled in root directory
cMakeRoot = CMAKE_ROOT_DIR;
modules = cMakeRoot + "/Modules/FindVTK.cmake";
}
@@ -196,14 +196,16 @@ void cmake::AddCMakePaths(const std::vector<std::string>& args)
#ifdef CMAKE_PREFIX
else if (!cmSystemTools::FileExists(modules.c_str()))
{
- // try compiled in value on UNIX
+ // try compiled in install prefix
cMakeRoot = CMAKE_PREFIX "/share/CMake";
modules = cMakeRoot + "/Modules/FindVTK.cmake";
}
#endif
else if (!cmSystemTools::FileExists(modules.c_str()))
{
- cMakeRoot = cMakeRoot + "/share/CMake";
+ // try
+ cMakeRoot = cmSystemTools::GetProgramPath(cMakeSelf.c_str());
+ cMakeRoot += "/share/CMake";
modules = cMakeRoot + "/Modules/FindVTK.cmake";
}
else if (!cmSystemTools::FileExists(modules.c_str()))