Merge topic 'fix-add_library-check-for-shared'

bd360ee3 add_library: Fix target type check for non-shared-lib platforms
This commit is contained in:
Brad King 2014-12-04 10:23:24 -05:00 committed by CMake Topic Stage
commit e4665171f4
1 changed files with 2 additions and 3 deletions

View File

@ -328,9 +328,8 @@ bool cmAddLibraryCommand
CMAKE_${LANG}_CREATE_SHARED_LIBRARY is defined and if not default to
STATIC. But at this point we know only the name of the target, but not
yet its linker language. */
if ((type != cmTarget::STATIC_LIBRARY) &&
(type != cmTarget::OBJECT_LIBRARY) &&
(type != cmTarget::INTERFACE_LIBRARY) &&
if ((type == cmTarget::SHARED_LIBRARY ||
type == cmTarget::MODULE_LIBRARY) &&
(this->Makefile->GetCMakeInstance()->GetPropertyAsBool(
"TARGET_SUPPORTS_SHARED_LIBS") == false))
{