Instead of creating extra libraries we don't really need, collect a
list of all dialects and use that instead.
Did you need to separate the add_mlir_dialect from add_mlir_dialect_library because some of them don't use add_mlir_dialect / don't have an entry in the include directory? Otherwise why not setting the MLIR_DIALECT_LIBS property in the add_mlir_dialect function?
It does seem odd at first sight, but in the current scheme, there are multiple libraries for some dialects, so it's not a 1:1 relationship.. Even if there was a 1:1 relationship it seems odd to me that a declaration about a library shows up in the include directory. This way is consistent with the corresponding change for Conversions, and I think a similar scheme could be done for Transforms.