[cmake-developers] [PATCH] VS, WINCE: Only set EntryPointSymbol for executables

Pascal Bach pascal.bach at siemens.com
Mon Sep 22 10:19:36 EDT 2014


---
 Source/cmVisualStudio10TargetGenerator.cxx |   10 ++++++++--
 1 file changed, 8 insertions(+), 2 deletions(-)

diff --git a/Source/cmVisualStudio10TargetGenerator.cxx b/Source/cmVisualStudio10TargetGenerator.cxx
index 4b5c83f..e0a32a2 100644
--- a/Source/cmVisualStudio10TargetGenerator.cxx
+++ b/Source/cmVisualStudio10TargetGenerator.cxx
@@ -2118,7 +2118,10 @@ cmVisualStudio10TargetGenerator::ComputeLinkOptions(std::string const& config)
       if (this->GlobalGenerator->TargetsWindowsCE())
         {
         linkOptions.AddFlag("SubSystem", "WindowsCE");
-        linkOptions.AddFlag("EntryPointSymbol", "WinMainCRTStartup");
+        if (this->Target->GetType() == cmTarget::EXECUTABLE)
+          {
+          linkOptions.AddFlag("EntryPointSymbol", "WinMainCRTStartup");
+          }
         }
       else
         {
@@ -2130,7 +2133,10 @@ cmVisualStudio10TargetGenerator::ComputeLinkOptions(std::string const& config)
       if (this->GlobalGenerator->TargetsWindowsCE())
         {
         linkOptions.AddFlag("SubSystem", "WindowsCE");
-        linkOptions.AddFlag("EntryPointSymbol", "mainACRTStartup");
+        if (this->Target->GetType() == cmTarget::EXECUTABLE)
+          {
+          linkOptions.AddFlag("EntryPointSymbol", "mainACRTStartup");
+          }
         }
       else
         {
-- 
1.7.10.4



More information about the cmake-developers mailing list