summaryrefslogtreecommitdiffstats
path: root/Source/cmAddLibraryCommand.cxx
diff options
context:
space:
mode:
Diffstat (limited to 'Source/cmAddLibraryCommand.cxx')
-rw-r--r--Source/cmAddLibraryCommand.cxx5
1 files changed, 4 insertions, 1 deletions
diff --git a/Source/cmAddLibraryCommand.cxx b/Source/cmAddLibraryCommand.cxx
index cc55f80..bbfa5ce 100644
--- a/Source/cmAddLibraryCommand.cxx
+++ b/Source/cmAddLibraryCommand.cxx
@@ -16,6 +16,8 @@
=========================================================================*/
#include "cmAddLibraryCommand.h"
+#include "cmake.h"
+
// cmLibraryCommand
bool cmAddLibraryCommand::InitialPass(std::vector<std::string> const& args)
{
@@ -82,7 +84,8 @@ bool cmAddLibraryCommand::InitialPass(std::vector<std::string> const& args)
STATIC. But at this point we know only the name of the target, but not
yet its linker language. */
if ((type != cmTarget::STATIC_LIBRARY) &&
- (this->Makefile->IsOn("CMAKE_TARGET_SUPPORTS_ONLY_STATIC_LIBS")))
+ (this->Makefile->GetCMakeInstance()->GetPropertyAsBool(
+ "TARGET_SUPPORTS_SHARED_LIBS") == false))
{
std::string msg = "ADD_LIBRARY for library ";
msg += args[0];