from conans import ConanFile, CMake, tools import os class ExampleConan(ConanFile): name = "example" version = "0.1" license = "MIT" author = " " url = "" description = "" topics = ("", "", "") settings = "os", "compiler", "build_type", "arch" options = {"shared": [True, False]} default_options = {"shared": False} generators = "cmake" def source(self): self.run("git clone --depth=1 --single-branch --branch master https://github.com/conan-io/hello.git") def build(self): cmake = CMake(self) cmake.configure(source_folder="hello") cmake.build() 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 = ["example"]