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/QtDialog/CMakeSetup.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/QtDialog/CMakeSetup.cxx')
-rw-r--r-- | Source/QtDialog/CMakeSetup.cxx | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/Source/QtDialog/CMakeSetup.cxx b/Source/QtDialog/CMakeSetup.cxx index bdc8a66..bf78890 100644 --- a/Source/QtDialog/CMakeSetup.cxx +++ b/Source/QtDialog/CMakeSetup.cxx @@ -66,6 +66,7 @@ static const char * cmDocumentationOptions[][3] = int main(int argc, char** argv) { + cmSystemTools::FindExecutableDirectory(argv[0]); QApplication app(argc, argv); // clean out standard Qt paths for plugins, which we don't use anyway @@ -113,7 +114,12 @@ int main(int argc, char** argv) // Construct and print requested documentation. cmake hcm; hcm.AddCMakePaths(); - doc.SetCMakeRoot(hcm.GetCacheDefinition("CMAKE_ROOT")); + // just incase the install is bad avoid a seg fault + const char* root = hcm.GetCacheDefinition("CMAKE_ROOT"); + if(root) + { + doc.SetCMakeRoot(root); + } std::vector<cmDocumentationEntry> commands; std::vector<cmDocumentationEntry> compatCommands; std::map<std::string,cmDocumentationSection *> propDocs; |