exiv2/conanfile.py
Luis Díaz Más 24be5a514e [Appveyor] Build exiv2 with Visual Studio 2012 and 2013
- Integration tests had to be disabled with 2012 and 2013. There were
few (4) tests failing for these cases.
- Only bring libiconv with conan when a windows subsystem is detected.
- libiconv can be enabled now with a conan option.
- Use infinity instead of INFINITY
- Use conan_basic_setup(). Fixes a problem with gtest is VS2012
- call vcvarsall.bat for each compiler version so that nmake can be
found.
2018-09-10 10:31:00 +02:00

40 lines
1.3 KiB
Python

from conans import ConanFile
from conans.tools import os_info
class Exiv2Conan(ConanFile):
settings = 'os', 'compiler', 'build_type', 'arch'
generators = 'cmake'
options = {'unitTests': [True, False],
'xmp': [True, False],
'iconv': [True, False],
}
default_options = ('unitTests=True',
'xmp=False',
'iconv=False',
)
def configure(self):
if not os_info.is_macos:
self.options['libcurl'].shared = True
self.options['gtest'].shared = True
def requirements(self):
self.requires('zlib/1.2.11@conan/stable')
self.requires('libcurl/7.60.0@bincrafters/stable')
if os_info.is_windows and self.options.xmp:
if os_info.detect_windows_subsystem() in ("cygwin", "msys2"):
self.requires('libiconv/1.15@bincrafters/stable')
if self.options.unitTests:
self.requires('gtest/1.8.0@bincrafters/stable')
if self.options.xmp:
self.requires('XmpSdk/2016.7@piponazo/stable') # from conan-piponazo
else:
self.requires('Expat/2.2.5@pix4d/stable')
def imports(self):
self.copy('*.dll', dst='conanDlls', src='bin')
self.copy('*.dylib', dst='bin', src='lib')