123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051 |
- from conans import ConanFile, CMake, tools
- import os
- class LibTiffConan(ConanFile):
- name = "libtiff"
- version = "4.0.3"
- license = "libtiff"
- author = "Shawn Morford <DarkMorford@Gmail.com>"
- url = "https://code.darkmorford.net/conan-pkg/libtiff"
- description = ("This software provides support for the Tag Image File Format (TIFF), "
- "a widely used format for storing image data.")
- homepage = "http://simplesystems.org/libtiff/"
- topics = ("image", "graphic")
- settings = "os", "compiler", "build_type", "arch"
- options = {"shared": [True, False]}
- default_options = {"shared": False}
- generators = "cmake"
- @property
- def subfolder(self):
- return os.path.join(self.source_folder, f"tiff-{self.version}")
- def source(self):
- self.output.info(f"Downloading source for version {self.version}")
- tools.get(**self.conan_data["sources"][self.version])
- def configure(self):
- del self.settings.compiler.cppstd
- del self.settings.compiler.libcxx
- def build(self):
- cmake = CMake(self)
- cmake.configure(source_folder="hello")
- cmake.build()
- # Explicit way:
- # self.run('cmake %s/hello %s'
- # % (self.source_folder, cmake.command_line))
- # self.run("cmake --build . %s" % cmake.build_config)
- def package(self):
- self.copy("*.h", dst="include", src="hello")
- self.copy("*hello.lib", dst="lib", keep_path=False)
- self.copy("*.dll", dst="bin", keep_path=False)
- self.copy("*.so", dst="lib", keep_path=False)
- self.copy("*.dylib", dst="lib", keep_path=False)
- self.copy("*.a", dst="lib", keep_path=False)
- def package_info(self):
- self.cpp_info.libs = ["hello"]
|