ENH: clean up

This commit is contained in:
Bill Hoffman 2001-06-21 17:25:35 -04:00
parent 31ab42e5b7
commit 18b2449ca2

View File

@ -188,7 +188,7 @@ void cmake::AddCMakePaths(const std::vector<std::string>& args)
#ifdef CMAKE_ROOT_DIR #ifdef CMAKE_ROOT_DIR
else if (!cmSystemTools::FileExists(modules.c_str())) else if (!cmSystemTools::FileExists(modules.c_str()))
{ {
// try compiled in value on UNIX // try compiled in root directory
cMakeRoot = CMAKE_ROOT_DIR; cMakeRoot = CMAKE_ROOT_DIR;
modules = cMakeRoot + "/Modules/FindVTK.cmake"; modules = cMakeRoot + "/Modules/FindVTK.cmake";
} }
@ -196,14 +196,16 @@ void cmake::AddCMakePaths(const std::vector<std::string>& args)
#ifdef CMAKE_PREFIX #ifdef CMAKE_PREFIX
else if (!cmSystemTools::FileExists(modules.c_str())) else if (!cmSystemTools::FileExists(modules.c_str()))
{ {
// try compiled in value on UNIX // try compiled in install prefix
cMakeRoot = CMAKE_PREFIX "/share/CMake"; cMakeRoot = CMAKE_PREFIX "/share/CMake";
modules = cMakeRoot + "/Modules/FindVTK.cmake"; modules = cMakeRoot + "/Modules/FindVTK.cmake";
} }
#endif #endif
else if (!cmSystemTools::FileExists(modules.c_str())) 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"; modules = cMakeRoot + "/Modules/FindVTK.cmake";
} }
else if (!cmSystemTools::FileExists(modules.c_str())) else if (!cmSystemTools::FileExists(modules.c_str()))