ENH: Search for cmake executable full path added (window/unix)
This commit is contained in:
parent
da5b5c12cd
commit
03817a41cf
|
@ -20,10 +20,22 @@ CMakeSetupGUIImplementation
|
||||||
::CMakeSetupGUIImplementation()
|
::CMakeSetupGUIImplementation()
|
||||||
{
|
{
|
||||||
m_BuildPathChanged = false;
|
m_BuildPathChanged = false;
|
||||||
|
|
||||||
|
// Construct the full path to cmake executable
|
||||||
|
|
||||||
|
#if defined(_WIN32)
|
||||||
char fname[1024];
|
char fname[1024];
|
||||||
//::GetModuleFileName(NULL,fname,1023); // Didn't found this method. (?)
|
::GetModuleFileName(NULL,fname,1023); // Didn't found this method. (?)
|
||||||
m_PathToExecutable = cmSystemTools::GetProgramPath(fname).c_str();
|
m_PathToExecutable = cmSystemTools::GetProgramPath(fname).c_str();
|
||||||
m_PathToExecutable += "/cmake.exe";
|
m_PathToExecutable += "/cmake.exe";
|
||||||
|
#else
|
||||||
|
char fullPathToCMake[1024];
|
||||||
|
filename_absolute( fullPathToCMake, "../cmake" );
|
||||||
|
m_PathToExecutable = fullPathToCMake;
|
||||||
|
#endif
|
||||||
|
|
||||||
|
std::cout << "Path to CMake executable " << m_PathToExecutable << std::endl;
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue