project('{{ PKG.NAME }}', 'cpp',
  version: '0.1.0',
  default_options: ['cpp_std=c++17', 'warning_level=3']
)

# Find the Python installation
py_mod = import('python')
py = py_mod.find_installation()
py_dep = py.dependency()

# Find pybind11
pybind11_dep = dependency('pybind11', required: true)

# Create Python extension modules
{% for MOD in PKG.MODULES %}
{%- if MOD.EXTRAS and MOD.EXTRAS.DEPENDENCIES %}
{%- for dep in MOD.EXTRAS.DEPENDENCIES -%}
{{ dep }}_dep = dependency('{{ dep }}', required: true)
{%- endfor %}
{%- endif %}
{% endfor %}

# Include directory for the main submodule
subdir('{{ PKG.NAME }}')