diff --git a/Source/cmExportFileGenerator.cxx b/Source/cmExportFileGenerator.cxx index c48aff840..fbaeda6f2 100644 --- a/Source/cmExportFileGenerator.cxx +++ b/Source/cmExportFileGenerator.cxx @@ -168,7 +168,6 @@ cmExportFileGenerator std::vector actual_libs; cmTarget::LinkLibraryVectorType const& libs = target->GetOriginalLinkLibraries(); - const char* sep = ""; for(cmTarget::LinkLibraryVectorType::const_iterator li = libs.begin(); li != libs.end(); ++li) { @@ -207,6 +206,10 @@ cmExportFileGenerator for(std::vector::const_iterator li = libs.begin(); li != libs.end(); ++li) { + // Separate this from the previous entry. + link_libs += sep; + sep = ";"; + // Append this entry. if(cmTarget* tgt = mf->FindTargetToUse(li->c_str())) {