From c4ca46e7b63715794b32f35f6bd431f0cc45d9e4 Mon Sep 17 00:00:00 2001 From: Edgar Date: Tue, 3 Aug 2021 14:31:55 +0000 Subject: [PATCH] :tada: Added freeimage --- freeimage/all/conandata.yml | 4 ++++ freeimage/all/conanfile.py | 36 ++++++++++++++++++++++++++++++++++++ freeimage/config.yml | 3 +++ 3 files changed, 43 insertions(+) create mode 100644 freeimage/all/conandata.yml create mode 100644 freeimage/all/conanfile.py create mode 100644 freeimage/config.yml diff --git a/freeimage/all/conandata.yml b/freeimage/all/conandata.yml new file mode 100644 index 0000000..d922e40 --- /dev/null +++ b/freeimage/all/conandata.yml @@ -0,0 +1,4 @@ +sources: + "3.19.0": + url: "http://downloads.sourceforge.net/freeimage/FreeImage3180.zip" + sha256: "f41379682f9ada94ea7b34fe86bf9ee00935a3147be41b6569c9605a53e438fd" \ No newline at end of file diff --git a/freeimage/all/conanfile.py b/freeimage/all/conanfile.py new file mode 100644 index 0000000..e84caea --- /dev/null +++ b/freeimage/all/conanfile.py @@ -0,0 +1,36 @@ +from conans import ConanFile, MSBuild, tools, AutoToolsBuildEnvironment +from conans.tools import os_info + + +class freeimageConan(ConanFile): + name = "freeimage" + license = "GNU" + author = "Edgar (Edgar@AnotherFoxGuy.com)" + url = "https://github.com/AnotherFoxGuy/conan-freeimage" + description = "FreeImage is an Open Source library project for developers who would like to support popular graphics image formats like PNG, BMP, JPEG, TIFF and others as needed by today's multimedia applications." + settings = "os", "compiler", "build_type", "arch" + + def source(self): + tools.get(**self.conan_data["sources"][self.version], strip_root=True) + + def build(self): + if os_info.is_windows: + msbuild = MSBuild(self) + msbuild.build("FreeImage.2017.sln") + else: + autotools = AutoToolsBuildEnvironment(self) + autotools.make() + + def package(self): + self.copy("*.h", dst="include", src="Dist", keep_path=False) + self.copy("*.lib", dst="lib", src="Dist", keep_path=False) + self.copy("*.dll", dst="bin", src="Dist", keep_path=False) + self.copy("*.so", dst="lib", src="Dist", keep_path=False) + self.copy("*.a", dst="lib", src="Dist", keep_path=False) + self.copy("*.lib", dst="lib", src="Source", keep_path=False) + self.copy("*.dll", dst="bin", src="Source", keep_path=False) + self.copy("*.so", dst="lib", src="Source", keep_path=False) + self.copy("*.a", dst="lib", src="Source", keep_path=False) + + def package_info(self): + self.cpp_info.libs = tools.collect_libs(self) diff --git a/freeimage/config.yml b/freeimage/config.yml new file mode 100644 index 0000000..e07cf3f --- /dev/null +++ b/freeimage/config.yml @@ -0,0 +1,3 @@ +versions: + "3.19.0": + folder: all