cmake.recipe 1.25 KB
Newer Older
1
2
3
4
5
# -*- Mode: Python -*- vi:si:et:sw=4:sts=4:ts=4:syntax=python


class Recipe(recipe.Recipe):
    name = 'cmake'
6
    version = '2.8.11'
7
    licenses = [License.BSD_like]
8
    btype = BuildType.MAKEFILE
9
    stype = SourceType.TARBALL
10
    url = 'http://www.cmake.org/files/v2.8/cmake-2.8.11.tar.gz'
11
12
13
14
15
    deps = ['autoconf']

    add_host_build_target = False
    config_sh = './bootstrap'
    configure_tpl = "%(config-sh)s --prefix=%(prefix)s"
16
    can_use_configure_cache = False
17
18

    files_bin = ['bin/cmake', 'bin/ccmake']
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35

    def prepare(self):
        if self.config.target_platform == Platform.WINDOWS:
            if self.config.target_arch == Architecture.X86_64:
                # Setting SYSTEM_NAME sets CMAKE_CROSSCOMPILING and the
                # binutils such as ar and ranlib are prefixed correctly
                self.configure_tpl += ' -- -DCMAKE_SYSTEM_NAME="Windows"'

    def configure(self):
        if self.config.target_platform == Platform.WINDOWS:
            if self.config.target_arch == Architecture.X86_64:
                # Bootstrap needs to be run twice for some dark reason
                try:
                    super(recipe.Recipe, self).configure()
                except:
                    pass
        super(recipe.Recipe, self).configure()