summaryrefslogtreecommitdiffstats
path: root/Source/CPack
diff options
context:
space:
mode:
authorBrad King <brad.king@kitware.com>2015-03-30 13:27:55 (GMT)
committerCMake Topic Stage <kwrobot@kitware.com>2015-03-30 13:27:55 (GMT)
commitc1f8c6cdf94d650df1bd8ec847ae7ac453550978 (patch)
tree227ed7bb81510d2576204540b9c519e35175ea0a /Source/CPack
parentc117c2bb5ef162dfa7d4cb2eb1acd0ee48c06297 (diff)
parente3f84fc504e96d1bdbc9c70434135903c449bdd1 (diff)
downloadCMake-c1f8c6cdf94d650df1bd8ec847ae7ac453550978.zip
CMake-c1f8c6cdf94d650df1bd8ec847ae7ac453550978.tar.gz
CMake-c1f8c6cdf94d650df1bd8ec847ae7ac453550978.tar.bz2
Merge topic 'cpack-archive-prefix'
e3f84fc5 cpack: Fix CPACK_PACKAGING_INSTALL_PREFIX handling for archives (#14677)
Diffstat (limited to 'Source/CPack')
-rw-r--r--Source/CPack/cmCPackArchiveGenerator.cxx8
1 files changed, 8 insertions, 0 deletions
diff --git a/Source/CPack/cmCPackArchiveGenerator.cxx b/Source/CPack/cmCPackArchiveGenerator.cxx
index e2437b5..05b5cd9 100644
--- a/Source/CPack/cmCPackArchiveGenerator.cxx
+++ b/Source/CPack/cmCPackArchiveGenerator.cxx
@@ -63,6 +63,14 @@ int cmCPackArchiveGenerator::addOneComponentToArchive(cmArchiveWrite& archive,
filePrefix = this->GetOption("CPACK_PACKAGE_FILE_NAME");
filePrefix += "/";
}
+ const char* installPrefix =
+ this->GetOption("CPACK_PACKAGING_INSTALL_PREFIX");
+ if(installPrefix && installPrefix[0] == '/' && installPrefix[1] != 0)
+ {
+ // add to file prefix and remove the leading '/'
+ filePrefix += installPrefix+1;
+ filePrefix += "/";
+ }
std::vector<std::string>::const_iterator fileIt;
for (fileIt = component->Files.begin(); fileIt != component->Files.end();
++fileIt )