File: conanfile.py

package info (click to toggle)
exiv2 0.27.3-3
  • links: PTS, VCS
  • area: main
  • in suites: bullseye, sid
  • size: 54,956 kB
  • sloc: cpp: 80,713; python: 4,360; sh: 1,497; makefile: 320; javascript: 237; awk: 92; ansic: 78; sed: 16
file content (55 lines) | stat: -rw-r--r-- 2,240 bytes parent folder | download
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
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
from conans import ConanFile
from conans.tools import os_info
from conans.model.version import Version

class Exiv2Conan(ConanFile):
    settings = 'os', 'compiler', 'build_type', 'arch'
    generators = 'cmake'
    options = {'unitTests': [True, False],
               'xmp': [True, False],
               'iconv': [True, False],
               'webready': [True, False],
              }
    default_options = ('unitTests=True',
                       'xmp=False',
                       'iconv=False',
                       'webready=False',
                      )

    def configure(self):
        self.options['libcurl'].shared = False
        self.options['libcurl'].with_openssl = True
        self.options['gtest'].shared = True

    def requirements(self):
        self.requires('zlib/1.2.11@conan/stable')

        if os_info.is_windows and self.options.iconv:
            self.requires('libiconv/1.15@bincrafters/stable')

        if self.options.unitTests:
            if self.settings.compiler == "Visual Studio" and Version(self.settings.compiler.version.value) <= "12":
                self.requires('gtest/1.8.0@bincrafters/stable')
            else:
                self.requires('gtest/1.8.1@bincrafters/stable')

        if self.options.webready and not os_info.is_macos:
            # Note: This difference in versions is just due to a combination of corner cases in the
            # recipes and the OS & compiler versions used in Travis and AppVeyor. In normal cases we
            # could use any of the versions.Also note that the issue was not with libcurl but with
            # libopenssl (a transitive dependency)
            if os_info.is_windows:
                self.requires('libcurl/7.69.1')
                self.options['libcurl'].with_openssl = False
                self.options['libcurl'].with_winssl = True
            else:
                self.requires('libcurl/7.64.1@bincrafters/stable')

        if self.options.xmp:
            self.requires('XmpSdk/2016.7@piponazo/stable') # from conan-piponazo
        else:
            self.requires('Expat/2.2.6@pix4d/stable')

    def imports(self):
        self.copy('*.dll', dst='conanDlls', src='bin')
        self.copy('*.dylib', dst='bin', src='lib')