message: Fix static builds
diff: @@ -314,9 +314,9 @@ function(caf_add_component name)
  endif()
  endforeach()
  set(pub_lib_target "libcaf_${name}")
  + if(CAF_ENABLE_TESTING AND CAF_ADD_COMPONENT_TEST_SOURCES)
  set(obj_lib_target "libcaf_${name}_obj")
  set(tst_bin_target "caf-${name}-test")
  - if(CAF_ENABLE_TESTING AND CAF_ADD_COMPONENT_TEST_SOURCES)
  set(targets ${pub_lib_target} ${obj_lib_target} ${tst_bin_target})
  add_library(${obj_lib_target} OBJECT
  ${CAF_ADD_COMPONENT_HEADERS} ${CAF_ADD_COMPONENT_SOURCES})
  @@ -345,7 +345,11 @@ function(caf_add_component name)
  target_link_libraries(${pub_lib_target} ${CAF_ADD_COMPONENT_DEPENDENCIES})
  if(CAF_ADD_COMPONENT_ENUM_TYPES)
  foreach(enum_name ${CAF_ADD_COMPONENT_ENUM_TYPES})
  + if(obj_lib_target)
  caf_add_enum_type(${obj_lib_target} ${enum_name})
  + else()
  + caf_add_enum_type(${pub_lib_target} ${enum_name})
  + endif()
  endforeach()
  endif()
  foreach(target ${targets})
  