diff options
author | Bill Hoffman <bill.hoffman@kitware.com> | 2001-06-05 19:48:09 (GMT) |
---|---|---|
committer | Bill Hoffman <bill.hoffman@kitware.com> | 2001-06-05 19:48:09 (GMT) |
commit | 8e281e5d5f1d59fc404f2cd694d4e871c001e3a1 (patch) | |
tree | b3fc68ea68fb11fb002bc824b6d8884e82249bb4 /Source/cmDSPWriter.cxx | |
parent | b92b0252263f29fef2dec3174e86207898f6677c (diff) | |
download | CMake-8e281e5d5f1d59fc404f2cd694d4e871c001e3a1.zip CMake-8e281e5d5f1d59fc404f2cd694d4e871c001e3a1.tar.gz CMake-8e281e5d5f1d59fc404f2cd694d4e871c001e3a1.tar.bz2 |
BUG: fix EXE and LIB path problems
Diffstat (limited to 'Source/cmDSPWriter.cxx')
-rw-r--r-- | Source/cmDSPWriter.cxx | 42 |
1 files changed, 41 insertions, 1 deletions
diff --git a/Source/cmDSPWriter.cxx b/Source/cmDSPWriter.cxx index cbc100f..505e36d 100644 --- a/Source/cmDSPWriter.cxx +++ b/Source/cmDSPWriter.cxx @@ -474,6 +474,46 @@ void cmDSPMakefile::WriteDSPHeader(std::ostream& fout, const char *libName, exePath = m_Makefile->GetDefinition("EXECUTABLE_OUTPUT_PATH"); } + if(libPath.size()) + { + // make sure there is a trailing slash + if(libPath[libPath.size()-1] != '/') + { + libPath += "/"; + } + libOptions += " /LIBPATH:\""; + libOptions += libPath; + libOptions += "$(IntDir)\" "; + libOptions += " /LIBPATH:\""; + libOptions += libPath; + libOptions += "\" "; + libMultiLineOptions += "# ADD LINK32 /LIBPATH:\""; + libMultiLineOptions += libPath; + libMultiLineOptions += "$(IntDir)\" "; + libMultiLineOptions += " /LIBPATH:\""; + libMultiLineOptions += libPath; + libMultiLineOptions += "\" \n"; + } + if(exePath.size()) + { + // make sure there is a trailing slash + if(exePath[exePath.size()-1] != '/') + { + exePath += "/"; + } + libOptions += " /LIBPATH:\""; + libOptions += exePath; + libOptions += "$(IntDir)\" "; + libOptions += " /LIBPATH:\""; + libOptions += exePath; + libOptions += "\" "; + libMultiLineOptions += "# ADD LINK32 /LIBPATH:\""; + libMultiLineOptions += exePath; + libMultiLineOptions += "$(IntDir)\" "; + libMultiLineOptions += " /LIBPATH:\""; + libMultiLineOptions += exePath; + libMultiLineOptions += "\" \n"; + } std::vector<std::string>::iterator i; std::vector<std::string>& libdirs = m_Makefile->GetLinkDirectories(); for(i = libdirs.begin(); i != libdirs.end(); ++i) @@ -486,7 +526,7 @@ void cmDSPMakefile::WriteDSPHeader(std::ostream& fout, const char *libName, libOptions += "\" "; libMultiLineOptions += "# ADD LINK32 /LIBPATH:\""; - libMultiLineOptions += *i; + libMultiLineOptions += *i; libMultiLineOptions += "/$(OUTDIR)\" "; libMultiLineOptions += " /LIBPATH:\""; libMultiLineOptions += *i; |