1from conans import ConanFile, MSBuild
2
3class CyrusSaslConan(ConanFile):
4    version = "2.1.26"
5    license = "BSD-with-attribution"
6    url = "https://github.com/Ri0n/cyrus-sasl.git"
7    settings = "os", "compiler", "build_type", "arch"
8    exports_sources="../../../*"
9
10    name = "cyrus-sasl-sasl2"
11    description = "Simple Authentication and Security Layer (SASL)"
12    options = {"shared": [True, False]}
13    default_options = "shared=True"
14    requires = "OpenSSL/1.0.2o@conan/stable"
15
16    def build(self):
17        msbuild = MSBuild(self)
18        msbuild.build("win32\\cyrus-sasl-core.sln")
19
20    def package(self):
21        self.copy("*.h", dst="include\sasl", src="include")
22        self.copy("*sasl2*.lib", dst="lib", keep_path=False)
23        self.copy("*.dll", dst="bin", keep_path=False)
24        self.copy("*.so", dst="lib", keep_path=False)
25        self.copy("*.dylib", dst="lib", keep_path=False)
26        self.copy("*.a", dst="lib", keep_path=False)
27
28    def package_info(self):
29        self.cpp_info.libs = ["sasl2.lib"]
30