diff options
Diffstat (limited to 'Source/cmLocalGenerator.cxx')
-rw-r--r-- | Source/cmLocalGenerator.cxx | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/Source/cmLocalGenerator.cxx b/Source/cmLocalGenerator.cxx index f4de0f2..b26151c 100644 --- a/Source/cmLocalGenerator.cxx +++ b/Source/cmLocalGenerator.cxx @@ -1180,7 +1180,7 @@ void cmLocalGenerator::AddCompileOptions( //---------------------------------------------------------------------------- void cmLocalGenerator::GetIncludeDirectories(std::vector<std::string>& dirs, - cmGeneratorTarget* target, + cmGeneratorTarget const* target, const std::string& lang, const std::string& config, bool stripImplicitInclDirs @@ -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()) |