diff options
author | Brad King <brad.king@kitware.com> | 2001-07-02 19:38:02 (GMT) |
---|---|---|
committer | Brad King <brad.king@kitware.com> | 2001-07-02 19:38:02 (GMT) |
commit | e693d47253157c9372aeb7c2edbecef8d1fb6225 (patch) | |
tree | 296e6789a8596e112f2139b13e71b53219309bd0 /Source/cmDSPWriter.cxx | |
parent | ae2723878e08a8aa016869e90711e260d981df38 (diff) | |
download | CMake-e693d47253157c9372aeb7c2edbecef8d1fb6225.zip CMake-e693d47253157c9372aeb7c2edbecef8d1fb6225.tar.gz CMake-e693d47253157c9372aeb7c2edbecef8d1fb6225.tar.bz2 |
ENH: Added support for selection of static/shared build on a per-library basis.
Diffstat (limited to 'Source/cmDSPWriter.cxx')
-rw-r--r-- | Source/cmDSPWriter.cxx | 17 |
1 files changed, 8 insertions, 9 deletions
diff --git a/Source/cmDSPWriter.cxx b/Source/cmDSPWriter.cxx index 76dc207..71973df 100644 --- a/Source/cmDSPWriter.cxx +++ b/Source/cmDSPWriter.cxx @@ -88,11 +88,6 @@ void cmDSPWriter::OutputDSPFile() } // Create the DSP or set of DSP's for libraries and executables - m_LibraryBuildType = STATIC_LIBRARY; - if(!cmSystemTools::IsOff(m_Makefile->GetDefinition("BUILD_SHARED_LIBS"))) - { - m_LibraryBuildType = DLL; - } // clear project names m_CreatedProjectNames.clear(); @@ -104,8 +99,11 @@ void cmDSPWriter::OutputDSPFile() { switch(l->second.GetType()) { - case cmTarget::LIBRARY: - this->SetBuildType(m_LibraryBuildType, l->first.c_str()); + case cmTarget::STATIC_LIBRARY: + this->SetBuildType(STATIC_LIBRARY, l->first.c_str()); + break; + case cmTarget::SHARED_LIBRARY: + this->SetBuildType(DLL, l->first.c_str()); break; case cmTarget::EXECUTABLE: this->SetBuildType(EXECUTABLE,l->first.c_str()); @@ -538,8 +536,9 @@ void cmDSPWriter::WriteDSPHeader(std::ostream& fout, const char *libName, { // add libraries to executables and dlls (but never include // a library in a library, bad recursion) - if (target.GetType() != cmTarget::LIBRARY || - (m_LibraryBuildType == DLL && libName != j->first)) + if ((target.GetType() != cmTarget::SHARED_LIBRARY + && target.GetType() != cmTarget::STATIC_LIBRARY) || + (target.GetType() == cmTarget::SHARED_LIBRARY && libName != j->first)) { std::string lib = j->first; if(j->first.find(".lib") == std::string::npos) |