diff options
author | Clinton Stimpson <clinton@elemtech.com> | 2008-02-14 23:18:10 (GMT) |
---|---|---|
committer | Clinton Stimpson <clinton@elemtech.com> | 2008-02-14 23:18:10 (GMT) |
commit | df3169273a3333efe8ecb45da51e4c53b5d27fe9 (patch) | |
tree | 7972ad42f50bf836d9a8e71ebc7f1f70b8250ee7 /Source/QtDialog/QCMake.cxx | |
parent | 1c0595c73fe1fa88b67691794eef8ee10edfc257 (diff) | |
download | CMake-df3169273a3333efe8ecb45da51e4c53b5d27fe9.zip CMake-df3169273a3333efe8ecb45da51e4c53b5d27fe9.tar.gz CMake-df3169273a3333efe8ecb45da51e4c53b5d27fe9.tar.bz2 |
ENH: Add shortcut to start search/filter.
A bit of cleanup.
Disable tab navigation in cache variable list.
Enable home/end keys.
BUG: Ensure currently edited values are saved before doing configure.
Diffstat (limited to 'Source/QtDialog/QCMake.cxx')
-rw-r--r-- | Source/QtDialog/QCMake.cxx | 24 |
1 files changed, 14 insertions, 10 deletions
diff --git a/Source/QtDialog/QCMake.cxx b/Source/QtDialog/QCMake.cxx index 01c23da..020bdb8 100644 --- a/Source/QtDialog/QCMake.cxx +++ b/Source/QtDialog/QCMake.cxx @@ -31,22 +31,27 @@ QCMake::QCMake(QObject* p) qRegisterMetaType<QCMakeCacheProperty>(); qRegisterMetaType<QCMakeCachePropertyList>(); - QDir appDir(QCoreApplication::applicationDirPath()); -#if defined(Q_OS_WIN) - this->CMakeExecutable = appDir.filePath("cmake.exe"); -#elif defined(Q_OS_MAC) - appDir.cd("../../../"); // path to cmake in build directory (need to fix for deployment) - this->CMakeExecutable = appDir.filePath("cmake"); -#else - this->CMakeExecutable = appDir.filePath("cmake"); + QDir execDir(QCoreApplication::applicationDirPath()); + + QString cmakeGUICommand = QString("cmake-gui")+cmSystemTools::GetExecutableExtension(); + cmakeGUICommand = execDir.filePath(cmakeGUICommand); + +#if defined(Q_OS_MAC) + execDir.cd("../../../"); // path to cmake in build directory (need to fix for deployment) #endif - // TODO: check for existence? + + QString cmakeCommand = QString("cmake")+cmSystemTools::GetExecutableExtension(); + cmakeCommand = execDir.filePath(cmakeCommand); + cmSystemTools::DisableRunCommandOutput(); cmSystemTools::SetRunCommandHideConsole(true); cmSystemTools::SetErrorCallback(QCMake::errorCallback, this); + cmSystemTools::FindExecutableDirectory(cmakeCommand.toAscii().data()); this->CMakeInstance = new cmake; + this->CMakeInstance->SetCMakeCommand(cmakeCommand.toAscii().data()); + //this->CMakeInstance->SetCMakeEditCommand(cmakeGUICommand.toAscii().data()); this->CMakeInstance->SetCMakeEditCommand("cmake-gui"); this->CMakeInstance->SetProgressCallback(QCMake::progressCallback, this); @@ -131,7 +136,6 @@ void QCMake::configure() this->CMakeInstance->SetStartOutputDirectory(this->BinaryDirectory.toAscii().data()); this->CMakeInstance->SetGlobalGenerator( this->CMakeInstance->CreateGlobalGenerator(this->Generator.toAscii().data())); - this->CMakeInstance->SetCMakeCommand(this->CMakeExecutable.toAscii().data()); this->CMakeInstance->LoadCache(); this->CMakeInstance->PreLoadCMakeFiles(); |