diff options
author | David Cole <david.cole@kitware.com> | 2012-03-13 18:01:19 (GMT) |
---|---|---|
committer | David Cole <david.cole@kitware.com> | 2012-03-13 18:01:19 (GMT) |
commit | 0f4dfa6960e51b7460b91f828932a42d5827467a (patch) | |
tree | 4897652a443c4bbf90e202adb5305918e5045ab3 | |
parent | 4693cf84927850da0c10aae4308363fdc5890379 (diff) | |
download | CMake-0f4dfa6960e51b7460b91f828932a42d5827467a.zip CMake-0f4dfa6960e51b7460b91f828932a42d5827467a.tar.gz CMake-0f4dfa6960e51b7460b91f828932a42d5827467a.tar.bz2 |
CPack: Use real path to PackageMaker to find its version file (#12621)
On machines where a usr/bin/packagemaker symlink is found, we were
unable to find the version.plist file relative to the symlink.
Resolve the symlink first, so we can find it relative to the
real PackageMaker.
-rw-r--r-- | Source/CPack/cmCPackPackageMakerGenerator.cxx | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/Source/CPack/cmCPackPackageMakerGenerator.cxx b/Source/CPack/cmCPackPackageMakerGenerator.cxx index 1633482..7d00452 100644 --- a/Source/CPack/cmCPackPackageMakerGenerator.cxx +++ b/Source/CPack/cmCPackPackageMakerGenerator.cxx @@ -402,6 +402,9 @@ int cmCPackPackageMakerGenerator::InitializeInternal() this->SetOptionIfNotSet("CPACK_INSTALLER_PROGRAM", pkgPath.c_str()); } + // Get path to the real PackageMaker, not a symlink: + pkgPath = cmSystemTools::GetRealPath(pkgPath.c_str()); + // Up from there to find the version.plist file in the "Contents" dir: std::string contents_dir; contents_dir = cmSystemTools::GetFilenamePath(pkgPath); contents_dir = cmSystemTools::GetFilenamePath(contents_dir); |