BUG: fix for unix
This commit is contained in:
parent
18b2449ca2
commit
900f1be244
@ -141,12 +141,12 @@ void cmake::AddCMakePaths(const std::vector<std::string>& args)
|
|||||||
#endif
|
#endif
|
||||||
}
|
}
|
||||||
#ifdef CMAKE_PREFIX
|
#ifdef CMAKE_PREFIX
|
||||||
else if(!cmSystemTools::FileExists(cMakeSelf.c_str()))
|
if(!cmSystemTools::FileExists(cMakeSelf.c_str()))
|
||||||
{
|
{
|
||||||
cMakeSelf = CMAKE_PREFIX "/bin/cmake";
|
cMakeSelf = CMAKE_PREFIX "/bin/cmake";
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
else if(!cmSystemTools::FileExists(cMakeSelf.c_str()))
|
if(!cmSystemTools::FileExists(cMakeSelf.c_str()))
|
||||||
{
|
{
|
||||||
cmSystemTools::Error("CMAKE can not find the command line program cmake. "
|
cmSystemTools::Error("CMAKE can not find the command line program cmake. "
|
||||||
"Attempted path: ", cMakeSelf.c_str());
|
"Attempted path: ", cMakeSelf.c_str());
|
||||||
@ -177,16 +177,16 @@ void cmake::AddCMakePaths(const std::vector<std::string>& args)
|
|||||||
cMakeRoot = cMakeRoot.substr(0, slashPos);
|
cMakeRoot = cMakeRoot.substr(0, slashPos);
|
||||||
}
|
}
|
||||||
// is there no Modules direcory there?
|
// is there no Modules direcory there?
|
||||||
modules = cMakeRoot + "/Modules/FindVTK.cmake";
|
modules = cMakeRoot + "/Modules/FindVTK.cmake";
|
||||||
}
|
}
|
||||||
|
|
||||||
else if (!cmSystemTools::FileExists(modules.c_str()))
|
if (!cmSystemTools::FileExists(modules.c_str()))
|
||||||
{
|
{
|
||||||
// try exe/../share/cmake
|
// try exe/../share/cmake
|
||||||
modules = cMakeRoot + "/share/CMake/Modules/FindVTK.cmake";
|
modules = cMakeRoot + "/share/CMake/Modules/FindVTK.cmake";
|
||||||
}
|
}
|
||||||
#ifdef CMAKE_ROOT_DIR
|
#ifdef CMAKE_ROOT_DIR
|
||||||
else if (!cmSystemTools::FileExists(modules.c_str()))
|
if (!cmSystemTools::FileExists(modules.c_str()))
|
||||||
{
|
{
|
||||||
// try compiled in root directory
|
// try compiled in root directory
|
||||||
cMakeRoot = CMAKE_ROOT_DIR;
|
cMakeRoot = CMAKE_ROOT_DIR;
|
||||||
@ -194,21 +194,21 @@ void cmake::AddCMakePaths(const std::vector<std::string>& args)
|
|||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
#ifdef CMAKE_PREFIX
|
#ifdef CMAKE_PREFIX
|
||||||
else if (!cmSystemTools::FileExists(modules.c_str()))
|
if (!cmSystemTools::FileExists(modules.c_str()))
|
||||||
{
|
{
|
||||||
// try compiled in install prefix
|
// 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()))
|
if (!cmSystemTools::FileExists(modules.c_str()))
|
||||||
{
|
{
|
||||||
// try
|
// try
|
||||||
cMakeRoot = cmSystemTools::GetProgramPath(cMakeSelf.c_str());
|
cMakeRoot = cmSystemTools::GetProgramPath(cMakeSelf.c_str());
|
||||||
cMakeRoot += "/share/CMake";
|
cMakeRoot += "/share/CMake";
|
||||||
modules = cMakeRoot + "/Modules/FindVTK.cmake";
|
modules = cMakeRoot + "/Modules/FindVTK.cmake";
|
||||||
}
|
}
|
||||||
else if (!cmSystemTools::FileExists(modules.c_str()))
|
if (!cmSystemTools::FileExists(modules.c_str()))
|
||||||
{
|
{
|
||||||
// couldn't find modules
|
// couldn't find modules
|
||||||
cmSystemTools::Error("Could not find CMAKE_ROOT !!!\n",
|
cmSystemTools::Error("Could not find CMAKE_ROOT !!!\n",
|
||||||
|
Loading…
x
Reference in New Issue
Block a user