summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--Source/cmLocalGenerator.cxx4
1 files changed, 3 insertions, 1 deletions
diff --git a/Source/cmLocalGenerator.cxx b/Source/cmLocalGenerator.cxx
index f4de0f2..3230403 100644
--- a/Source/cmLocalGenerator.cxx
+++ b/Source/cmLocalGenerator.cxx
@@ -1542,7 +1542,9 @@ void cmLocalGenerator::OutputLinkLibraries(std::string& linkLibraries,
this->Makefile->GetSafeDefinition("CMAKE_LIBRARY_PATH_TERMINATOR");
// Flags to link an executable to shared libraries.
- if( tgt.GetType() == cmTarget::EXECUTABLE )
+ if (tgt.GetType() == cmTarget::EXECUTABLE &&
+ this->StateSnapshot.GetState()->
+ GetGlobalPropertyAsBool("TARGET_SUPPORTS_SHARED_LIBS"))
{
bool add_shlib_flags = false;
switch(tgt.Target->GetPolicyStatusCMP0065())