diff options
author | Brad King <brad.king@kitware.com> | 2015-03-30 13:27:55 (GMT) |
---|---|---|
committer | CMake Topic Stage <kwrobot@kitware.com> | 2015-03-30 13:27:55 (GMT) |
commit | c1f8c6cdf94d650df1bd8ec847ae7ac453550978 (patch) | |
tree | 227ed7bb81510d2576204540b9c519e35175ea0a /Source/CPack | |
parent | c117c2bb5ef162dfa7d4cb2eb1acd0ee48c06297 (diff) | |
parent | e3f84fc504e96d1bdbc9c70434135903c449bdd1 (diff) | |
download | CMake-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.cxx | 8 |
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 ) |