target_properties.jinja 954 B

12345678910111213141516171819202122
  1. {%- if (current_target.target_properties is defined) and (current_target.target_properties|length) -%}
  2. {#- Deduplicate target property names -#}
  3. {%- set property_names = current_target.target_properties|map(attribute='name')|unique -%}
  4. {%- for property_name in property_names -%}
  5. {%- set properties = current_target.target_properties|selectattr('name', 'eq', property_name) -%}
  6. {#- Apply only first property by name -#}
  7. {%- set property = properties|first %}
  8. set_property(TARGET {{ name }} PROPERTY {{ property.name }}
  9. {%- for value in property.value %}
  10. {{ value }}
  11. {%- endfor %}
  12. )
  13. {% endfor -%}
  14. {%- endif -%}
  15. {%- if (current_target.protoc_extra_outs is defined) and (current_target.protoc_extra_outs|length) %}
  16. set_property(TARGET {{ name }} PROPERTY PROTOC_EXTRA_OUTS
  17. {%- for protoc_extra_out in current_target.protoc_extra_outs %}
  18. {{ protoc_extra_out }}
  19. {%- endfor %}
  20. )
  21. {% endif -%}