From f22a4a908ddf52f7c6fd3d9cdedd43eaeda734f0 Mon Sep 17 00:00:00 2001 From: Bill Hoffman Date: Thu, 3 Jul 2003 12:50:41 -0400 Subject: [PATCH] ENH: add linker flags --- Source/cmLocalVisualStudio7Generator.cxx | 32 +++++++++++++++++++----- 1 file changed, 26 insertions(+), 6 deletions(-) diff --git a/Source/cmLocalVisualStudio7Generator.cxx b/Source/cmLocalVisualStudio7Generator.cxx index 58621e4e7..dbde4a717 100644 --- a/Source/cmLocalVisualStudio7Generator.cxx +++ b/Source/cmLocalVisualStudio7Generator.cxx @@ -380,9 +380,29 @@ void cmLocalVisualStudio7Generator::OutputBuildTool(std::ostream& fout, if (debug && m_Makefile->GetDefinition("CMAKE_DEBUG_POSTFIX")) { debugPostfix = m_Makefile->GetDefinition("CMAKE_DEBUG_POSTFIX"); + } + + std::string extraLinkOptions; + if(target.GetType() == cmTarget::EXECUTABLE) + { + extraLinkOptions = m_Makefile->GetDefinition("CMAKE_EXE_LINKER_FLAGS"); } + if(target.GetType() == cmTarget::SHARED_LIBRARY) + { + extraLinkOptions = m_Makefile->GetDefinition("CMAKE_SHARED_LINKER_FLAGS"); + } + if(target.GetType() == cmTarget::MODULE_LIBRARY) + { + extraLinkOptions = m_Makefile->GetDefinition("CMAKE_MODULE_LINKER_FLAGS"); + } + const char* targetLinkFlags = target.GetProperty("LINK_FLAGS"); - + if(targetLinkFlags) + { + extraLinkOptions += " "; + extraLinkOptions += targetLinkFlags; + } + switch(target.GetType()) { case cmTarget::STATIC_LIBRARY: @@ -400,10 +420,10 @@ void cmLocalVisualStudio7Generator::OutputBuildTool(std::ostream& fout, fout << "\t\t\t