aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/project/mingw.py
blob: c837d28db7f6c8021ec686649ad6f3099c73d263 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
# Copyright (c) 2020 Egor Tensin <egor@tensin.name>
# This file is part of the "cmake-common" project.
# For details, see https://github.com/egor-tensin/cmake-common
# Distributed under the MIT License.


class MinGW:
    def __init__(self, platform):
        self.prefix = platform.mingw_prefix()

    def _get(self, what):
        return f"{self.prefix}-w64-mingw32-{what}"

    def gcc(self):
        return self._get("gcc")

    def gxx(self):
        return self._get("g++")

    def ar(self):
        return self._get("gcc-ar")

    def ranlib(self):
        return self._get("gcc-ranlib")

    def windres(self):
        return self._get("windres")