summaryrefslogtreecommitdiff
path: root/mesonbuild/templates/mesontemplates.py
blob: 23269392fdbe9cca54ce16830242121512800383 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
# SPDX-License-Identifier: Apache-2.0
# Copyright 2019 The Meson development team
# Copyright © 2023-2025 Intel Corporation

from __future__ import annotations

import typing as T

from .samplefactory import sample_generator

if T.TYPE_CHECKING:
    from ..minit import Arguments


def create_meson_build(options: Arguments) -> None:
    proj = sample_generator(options)
    if options.type == 'executable':
        proj.create_executable()
    else:
        proj.create_library()