summaryrefslogtreecommitdiffstats
path: root/Source/QtDialog/QMacInstallDialog.cxx
diff options
context:
space:
mode:
authorBill Hoffman <bill.hoffman@kitware.com>2008-04-03 20:18:37 (GMT)
committerBill Hoffman <bill.hoffman@kitware.com>2008-04-03 20:18:37 (GMT)
commit5d015723486caf4b140fcd6b701a7a1140bb52a2 (patch)
tree4e2820821c59861087a7d043cd57cb154aa9635d /Source/QtDialog/QMacInstallDialog.cxx
parent61af8d8b3283c3c8a91feb26b9c1ba1d2b972b2f (diff)
downloadCMake-5d015723486caf4b140fcd6b701a7a1140bb52a2.zip
CMake-5d015723486caf4b140fcd6b701a7a1140bb52a2.tar.gz
CMake-5d015723486caf4b140fcd6b701a7a1140bb52a2.tar.bz2
ENH: add ability to create symlinks for command line on mac from gui
Diffstat (limited to 'Source/QtDialog/QMacInstallDialog.cxx')
-rw-r--r--Source/QtDialog/QMacInstallDialog.cxx6
1 files changed, 6 insertions, 0 deletions
diff --git a/Source/QtDialog/QMacInstallDialog.cxx b/Source/QtDialog/QMacInstallDialog.cxx
index c3daaf2..57ed845 100644
--- a/Source/QtDialog/QMacInstallDialog.cxx
+++ b/Source/QtDialog/QMacInstallDialog.cxx
@@ -46,6 +46,12 @@ void QMacInstallDialog::DoInstall()
newName += filename;
std::cout << "ln -s [" << file << "] [";
std::cout << newName << "]\n";
+ // Remove the old files
+ if(cmSystemTools::FileExists(newName.c_str()))
+ {
+ std::cout << "rm [" << newName << "]\n";
+ cmSystemTools::RemoveFile(newName.c_str());
+ }
cmSystemTools::CreateSymlink(file.c_str(),
newName.c_str());
}