From ba4e56385c72130c632cf5bb9a3f0cd4f7bff040 Mon Sep 17 00:00:00 2001 From: Ken Martin Date: Mon, 27 Aug 2001 15:19:45 -0400 Subject: support for network path link libraries --- Source/cmDSPWriter.cxx | 22 +++++++++++++++++++--- 1 file changed, 19 insertions(+), 3 deletions(-) diff --git a/Source/cmDSPWriter.cxx b/Source/cmDSPWriter.cxx index 078c9b5..32a6be3 100644 --- a/Source/cmDSPWriter.cxx +++ b/Source/cmDSPWriter.cxx @@ -546,11 +546,27 @@ void cmDSPWriter::WriteDSPHeader(std::ostream& fout, const char *libName, lib += ".lib"; } lib = cmSystemTools::EscapeSpaces(lib.c_str()); + // watch for network paths, MSVC can't seem to load // + if (strlen(lib.c_str()) > 2 && lib.c_str()[0] == '/' && + lib.c_str()[1] == '/') + { + std::string lib2 = "\\\\"; + lib2 += (lib.c_str() + 2); + lib = lib2; + } + if (strlen(lib.c_str()) > 3 && lib.c_str()[0] == '"' && + lib.c_str()[1] == '/' && lib.c_str()[2] == '/') + { + std::string lib2 = "\"\\\\"; + lib2 += (lib.c_str() + 3); + lib = lib2; + } + if (j->second == cmTarget::GENERAL) { libOptions += " "; - libOptions += lib; - + libOptions += lib; + libMultiLineOptions += "# ADD LINK32 "; libMultiLineOptions += lib; libMultiLineOptions += "\n"; @@ -567,7 +583,7 @@ void cmDSPWriter::WriteDSPHeader(std::ostream& fout, const char *libName, if (j->second == cmTarget::OPTIMIZED) { libOptimizedOptions += " "; - libOptimizedOptions += lib; + libOptimizedOptions += lib; libMultiLineOptimizedOptions += "# ADD LINK32 "; libMultiLineOptimizedOptions += lib; -- cgit v0.12