diff options
author | Bill Hoffman <bill.hoffman@kitware.com> | 2001-11-16 21:28:42 (GMT) |
---|---|---|
committer | Bill Hoffman <bill.hoffman@kitware.com> | 2001-11-16 21:28:42 (GMT) |
commit | 25ac7687631dfd771d7eb975f64f74d5cf8256f1 (patch) | |
tree | 7b493e5a88be966b50cae95b202b1b1bc0dae1eb /Source/cmNMakeMakefileGenerator.cxx | |
parent | 3e16ec5edaa83eb2e3f59c5e71271e380762b5ae (diff) | |
download | CMake-25ac7687631dfd771d7eb975f64f74d5cf8256f1.zip CMake-25ac7687631dfd771d7eb975f64f74d5cf8256f1.tar.gz CMake-25ac7687631dfd771d7eb975f64f74d5cf8256f1.tar.bz2 |
ENH: fix for dll builds
Diffstat (limited to 'Source/cmNMakeMakefileGenerator.cxx')
-rw-r--r-- | Source/cmNMakeMakefileGenerator.cxx | 30 |
1 files changed, 19 insertions, 11 deletions
diff --git a/Source/cmNMakeMakefileGenerator.cxx b/Source/cmNMakeMakefileGenerator.cxx index 3adb4af..19ba1de 100644 --- a/Source/cmNMakeMakefileGenerator.cxx +++ b/Source/cmNMakeMakefileGenerator.cxx @@ -264,15 +264,8 @@ OutputBuildObjectFromSource(std::ostream& fout, } else if (ext == "def") { - // *** do something here?? - } - else if (ext == "ico") - { - // do something here?? - } - else if (ext == "rc2") - { - // do something here?? + // no rule to output for this one + return; } // assume c++ if not c rc or def else @@ -312,6 +305,16 @@ void cmNMakeMakefileGenerator::OutputSharedLibraryRule(std::ostream& fout, linklibs << std::ends; command += linklibs.str(); delete [] linklibs.str(); + const std::vector<cmSourceFile>& sources = t.GetSourceFiles(); + for(std::vector<cmSourceFile>::const_iterator i = sources.begin(); + i != sources.end(); ++i) + { + if(i->GetSourceExtension() == "def") + { + command += "/DEF:"; + command += i->GetFullPath(); + } + } command += "\n<<\n"; m_QuoteNextCommand = false; this->OutputMakeRule(fout, "rules for a shared library", @@ -429,15 +432,20 @@ void cmNMakeMakefileGenerator::OutputLinkLibraries(std::ostream& fout, } linkLibs += librariesLinked; - fout << linkLibs << "$(CMAKE_STANDARD_WINDOWS_LIBRARIES) "; + fout << linkLibs; } + fout << "$(CMAKE_STANDARD_WINDOWS_LIBRARIES) "; } std::string cmNMakeMakefileGenerator::GetOutputExtension(const char* s) { std::string sourceExtension = s; - if(sourceExtension == "def" || sourceExtension == "ico" || sourceExtension == "rc2") + if(sourceExtension == "def") + { + return ""; + } + if(sourceExtension == "ico" || sourceExtension == "rc2") { return ""; } |