mesonbuild/templates/mesontemplates.py
raw| 1 | # SPDX-License-Identifier: Apache-2.0 |
| 2 | # Copyright 2019 The Meson development team |
| 3 | # Copyright © 2023-2025 Intel Corporation |
| 4 | |
| 5 | from __future__ import annotations |
| 6 | |
| 7 | import typing as T |
| 8 | |
| 9 | from .samplefactory import sample_generator |
| 10 | |
| 11 | if T.TYPE_CHECKING: |
| 12 | from ..minit import Arguments |
| 13 | |
| 14 | |
| 15 | def create_meson_build(options: Arguments) -> None: |
| 16 | proj = sample_generator(options) |
| 17 | if options.type == 'executable': |
| 18 | proj.create_executable() |
| 19 | else: |
| 20 | proj.create_library() |