I ended up removing the ROOT dictionary generation, which simplifies greatly the CMakeLists, using ClassDefInline as suggested by @pcanal.