diff options
author | Bill Hoffman <bill.hoffman@kitware.com> | 2008-04-04 20:02:50 (GMT) |
---|---|---|
committer | Bill Hoffman <bill.hoffman@kitware.com> | 2008-04-04 20:02:50 (GMT) |
commit | 45ce11a0757a1006a235f34637892115ffeae66e (patch) | |
tree | be7370a18622502f98d774b00cd5606f3fa2ff72 /Source/cmake.cxx | |
parent | d1c660d49550af6f174cbfac4ce81bd7d7ce7a75 (diff) | |
download | CMake-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.cxx | 13 |
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 ", |