Automoc: Fix automoc for OBJECT libraries.

Before this patch,
add_library(obj OBJECT helper.cpp)
add_executable(tgt $<TARGET_OBJECTS:obj>)
didn't run automoc on helper.cpp.
This commit is contained in:
Yury G. Kudryashov 2013-01-11 12:42:34 +04:00
parent 5929086634
commit cf3faacad2
1 changed files with 2 additions and 1 deletions

View File

@ -1075,7 +1075,8 @@ void cmGlobalGenerator::CreateAutomocTargets()
if(target.GetType() == cmTarget::EXECUTABLE ||
target.GetType() == cmTarget::STATIC_LIBRARY ||
target.GetType() == cmTarget::SHARED_LIBRARY ||
target.GetType() == cmTarget::MODULE_LIBRARY)
target.GetType() == cmTarget::MODULE_LIBRARY ||
target.GetType() == cmTarget::OBJECT_LIBRARY)
{
if(target.GetPropertyAsBool("AUTOMOC") && !target.IsImported())
{