summaryrefslogtreecommitdiffstats
path: root/Source/cmDSPWriter.cxx
diff options
context:
space:
mode:
authorKen Martin <ken.martin@kitware.com>2001-08-27 19:19:45 (GMT)
committerKen Martin <ken.martin@kitware.com>2001-08-27 19:19:45 (GMT)
commitba4e56385c72130c632cf5bb9a3f0cd4f7bff040 (patch)
tree7c9a852ec19101e31bb00b2e43b14c8bbedaf93a /Source/cmDSPWriter.cxx
parentf709e5588eaae694c7b1203580da0b5487b9ef73 (diff)
downloadCMake-ba4e56385c72130c632cf5bb9a3f0cd4f7bff040.zip
CMake-ba4e56385c72130c632cf5bb9a3f0cd4f7bff040.tar.gz
CMake-ba4e56385c72130c632cf5bb9a3f0cd4f7bff040.tar.bz2
support for network path link libraries
Diffstat (limited to 'Source/cmDSPWriter.cxx')
-rw-r--r--Source/cmDSPWriter.cxx22
1 files 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;