Fixed a bug in xproto conversion to pure protobuf

Change-Id: I864b5def9fbeceb531f0ee5c6f5b2805e9c942cc
diff --git a/lib/xos-genx/xosgenx/targets/proto.xtarget b/lib/xos-genx/xosgenx/targets/proto.xtarget
index 27b9490..3f77f86 100644
--- a/lib/xos-genx/xosgenx/targets/proto.xtarget
+++ b/lib/xos-genx/xosgenx/targets/proto.xtarget
@@ -1,8 +1,15 @@
+{% for k,v in options.items() %}
+option {{ k }} = {{ v}};
+{%- endfor %}
 {% for m in proto.messages %}
 message {{ m.name }} {
-  option bases = "{{ m.bases | map(attribute='name') | join(",") }}";
-  {%- for f in m.fields %}
-  {{ f.modifier }} {{f.type}} {{f.name}} = {{ f.id }}{% if f.options %} [{% for k,v in f.options.iteritems() %} {{ k }} = "{{ v}}"{% if not loop.last %},{% endif %} {% endfor %}]{% endif %};
-  {%- endfor %}
+    option bases = "{{ m.bases | map(attribute='name') | join(",") }}";
+    {% for k,v in m.options.items() %}
+    option {{ k }} = {{ v}};
+    {%- endfor %}
+    {%- for f in m.fields %}
+    {{ f.modifier }} {{f.type}} {{f.name}} = {{ f.id }}{% if f.options %} [{% for k,v in f.options.iteritems() %} {{ k }} = "{{ v}}"{% if not loop.last %},{% endif %} {% endfor %}]{% endif %};
+    {%- endfor %}
 }
 {% endfor %}
+