diff options
author | Brad King <brad.king@kitware.com> | 2015-01-30 15:23:07 (GMT) |
---|---|---|
committer | CMake Topic Stage <kwrobot@kitware.com> | 2015-01-30 15:23:07 (GMT) |
commit | db4b9fe25673c252a93c15040909d328dc83dde9 (patch) | |
tree | 6037c8f33489218a7dfdeb72536eb39b84dfc88f | |
parent | 85fe9400cd68805501d2cd98cf7375c8845492f6 (diff) | |
parent | 55e68bc99e62430ba2a94410992effd87bea7e33 (diff) | |
download | CMake-db4b9fe25673c252a93c15040909d328dc83dde9.zip CMake-db4b9fe25673c252a93c15040909d328dc83dde9.tar.gz CMake-db4b9fe25673c252a93c15040909d328dc83dde9.tar.bz2 |
Merge topic 'fix-cpack-symlink-create-dir'
55e68bc9 Merge branch 'backport-fix-cpack-symlink-create-dir' into fix-cpack-symlink-create-dir
4dc5acee CPack: Fix packaging of source tarballs with symbolic links
81221b80 CPack: Fix packaging of source tarballs with symbolic links
-rw-r--r-- | Source/CPack/cmCPackGenerator.cxx | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/Source/CPack/cmCPackGenerator.cxx b/Source/CPack/cmCPackGenerator.cxx index f21fcf6..1c670d2 100644 --- a/Source/CPack/cmCPackGenerator.cxx +++ b/Source/CPack/cmCPackGenerator.cxx @@ -437,6 +437,18 @@ int cmCPackGenerator::InstallProjectViaInstalledDirectories( cmCPackLogger(cmCPackLog::LOG_DEBUG, "Will create a symlink: " << symlinkedIt->second << "--> " << symlinkedIt->first << std::endl); + // make sure directory exists for symlink + std::string destDir = + cmSystemTools::GetFilenamePath(symlinkedIt->second); + if(!destDir.empty() && !cmSystemTools::MakeDirectory(destDir)) + { + cmCPackLogger(cmCPackLog::LOG_ERROR, "Cannot create dir: " + << destDir + << "\nTrying to create symlink: " + << symlinkedIt->second << "--> " + << symlinkedIt->first + << std::endl); + } if (!cmSystemTools::CreateSymlink(symlinkedIt->first, symlinkedIt->second)) { |