summaryrefslogtreecommitdiffstats
path: root/Source/cmake.cxx
diff options
context:
space:
mode:
authorBill Hoffman <bill.hoffman@kitware.com>2008-04-04 20:02:50 (GMT)
committerBill Hoffman <bill.hoffman@kitware.com>2008-04-04 20:02:50 (GMT)
commit45ce11a0757a1006a235f34637892115ffeae66e (patch)
treebe7370a18622502f98d774b00cd5606f3fa2ff72 /Source/cmake.cxx
parentd1c660d49550af6f174cbfac4ce81bd7d7ce7a75 (diff)
downloadCMake-45ce11a0757a1006a235f34637892115ffeae66e.zip
CMake-45ce11a0757a1006a235f34637892115ffeae66e.tar.gz
CMake-45ce11a0757a1006a235f34637892115ffeae66e.tar.bz2
ENH: install the mac application bundle into /Applications directly with no enclosing folder
Diffstat (limited to 'Source/cmake.cxx')
-rw-r--r--Source/cmake.cxx13
1 files changed, 13 insertions, 0 deletions
diff --git a/Source/cmake.cxx b/Source/cmake.cxx
index 5256fd0..5e5859b 100644
--- a/Source/cmake.cxx
+++ b/Source/cmake.cxx
@@ -786,6 +786,19 @@ int cmake::AddCMakePaths()
cMakeSelf = cmSystemTools::GetRealPath(cMakeSelf.c_str());
cMakeSelf += "/cmake";
cMakeSelf += cmSystemTools::GetExecutableExtension();
+#if __APPLE__
+ // on the apple this might be the gui bundle
+ if(!cmSystemTools::FileExists(cMakeSelf.c_str()))
+ {
+ cMakeSelf = cmSystemTools::GetExecutableDirectory();
+ cMakeSelf = cmSystemTools::GetRealPath(cMakeSelf.c_str());
+ cMakeSelf += "../../../..";
+ cMakeSelf = cmSystemTools::GetRealPath(cMakeSelf.c_str());
+ cMakeSelf = cmSystemTools::CollapseFullPath(cMakeSelf.c_str());
+ cMakeSelf += "/cmake";
+ std::cerr << cMakeSelf.c_str() << "\n";
+ }
+#endif
if(!cmSystemTools::FileExists(cMakeSelf.c_str()))
{
cmSystemTools::Error("CMake executable cannot be found at ",