diff options
author | Andy Cedilnik <andy.cedilnik@kitware.com> | 2006-03-20 21:24:43 (GMT) |
---|---|---|
committer | Andy Cedilnik <andy.cedilnik@kitware.com> | 2006-03-20 21:24:43 (GMT) |
commit | fbfbe4717fb3687c5daee40dbb69e47992c0ef4f (patch) | |
tree | 0761cec22fd3e5acaaa4957a2df82d4af4b41a9c /Source/CPack | |
parent | a980fdc96a07bc469e77b37067dc76020d6e02f9 (diff) | |
download | CMake-fbfbe4717fb3687c5daee40dbb69e47992c0ef4f.zip CMake-fbfbe4717fb3687c5daee40dbb69e47992c0ef4f.tar.gz CMake-fbfbe4717fb3687c5daee40dbb69e47992c0ef4f.tar.bz2 |
ENH: Handle unusual path for packagemaker
Diffstat (limited to 'Source/CPack')
-rw-r--r-- | Source/CPack/cmCPackPackageMakerGenerator.cxx | 17 |
1 files changed, 12 insertions, 5 deletions
diff --git a/Source/CPack/cmCPackPackageMakerGenerator.cxx b/Source/CPack/cmCPackPackageMakerGenerator.cxx index b5d9951..dbce2f1 100644 --- a/Source/CPack/cmCPackPackageMakerGenerator.cxx +++ b/Source/CPack/cmCPackPackageMakerGenerator.cxx @@ -146,13 +146,19 @@ int cmCPackPackageMakerGenerator::Initialize(const char* name, cmMakefile* mf) std::string pkgPath = "/Developer/Applications/Utilities/PackageMaker.app/Contents"; std::string versionFile = pkgPath + "/version.plist"; - pkgPath += "/MacOS"; if ( !cmSystemTools::FileExists(versionFile.c_str()) ) { - cmCPackLogger(cmCPackLog::LOG_ERROR, - "Cannot find PackageMaker compiler version file: " - << versionFile.c_str() << std::endl); - return 0; + pkgPath = "/Developer/Applications/PackageMaker.app/Contents"; + std::string newVersionFile = pkgPath + "/version.plist"; + if ( !cmSystemTools::FileExists(newVersionFile.c_str()) ) + { + cmCPackLogger(cmCPackLog::LOG_ERROR, + "Cannot find PackageMaker compiler version file: " + << versionFile.c_str() << " or " << newVersionFile.c_str() + << std::endl); + return 0; + } + versionFile = newVersionFile; } std::ifstream ifs(versionFile.c_str()); if ( !ifs ) @@ -199,6 +205,7 @@ int cmCPackPackageMakerGenerator::Initialize(const char* name, cmMakefile* mf) cmCPackLogger(cmCPackLog::LOG_DEBUG, "PackageMaker version is: " << this->PackageMakerVersion << std::endl); + pkgPath += "/MacOS"; path.push_back(pkgPath); pkgPath = cmSystemTools::FindProgram("PackageMaker", path, false); if ( pkgPath.empty() ) |