From ddec0533213ef8c7ea80f31d82e4f7baabcd3956 Mon Sep 17 00:00:00 2001 From: Eric NOULARD Date: Sun, 14 Oct 2012 18:50:57 +0200 Subject: [PATCH] Make CPACK_SET_DESTDIR work with archive generator + component-based packaging Fix bug #13004. The patch is from Stanislaw Szymczyk. --- Source/CPack/cmCPackGenerator.cxx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Source/CPack/cmCPackGenerator.cxx b/Source/CPack/cmCPackGenerator.cxx index f11340046..fb08d36ac 100644 --- a/Source/CPack/cmCPackGenerator.cxx +++ b/Source/CPack/cmCPackGenerator.cxx @@ -905,7 +905,7 @@ int cmCPackGenerator::InstallProjectViaInstallCMakeProjects( localFileName = cmSystemTools::RelativePath(InstallPrefix, fit->c_str()); localFileName = - localFileName.substr(localFileName.find('/')+1, + localFileName.substr(localFileName.find_first_not_of('/'), std::string::npos); Components[installComponent].Files.push_back(localFileName); cmCPackLogger(cmCPackLog::LOG_DEBUG, "Adding file <"