From 57388e255f42ad301b5ff35bb28da4b4332b945d Mon Sep 17 00:00:00 2001 From: krishna-elear <53559967+krishna-elear@users.noreply.github.com> Date: Thu, 13 Jul 2023 03:42:42 +0530 Subject: [PATCH] Add conanfile.py --- conanfile.py | 37 +++++++++++++++++++++++++++++++++++++ 1 file changed, 37 insertions(+) create mode 100644 conanfile.py diff --git a/conanfile.py b/conanfile.py new file mode 100644 index 0000000..e8f80dd --- /dev/null +++ b/conanfile.py @@ -0,0 +1,37 @@ +import fnmatch +from conans import ConanFile, CMake, tools + +class JsonclibConan(ConanFile): + name = "json-c" + version = "0.16.99" + description = "JSON-C - A JSON implementation in C" + topics = ("conan", "json-c", "json", "encoding", "decoding", "manipulation") + url = "https://github.com/elear-solutions/json-c" + license = "MIT" + generators = "cmake" + settings = "os", "compiler", "build_type", "arch" + options = { + "shared": [True, False] + } + default_options = { + "shared": False + } + + def configure(self): + pass + + def build(self): + cmake = CMake(self) + cmake.definitions['BUILD_SHARED_LIBS'] = True + cmake.definitions['BUILD_STATIC_LIBS'] = True + + cmake.configure(source_folder=".") + cmake.build() + cmake.install() + + def package(self): + self.copy("*.h", dst="include", src="package/include") + self.copy("*", dst="lib", src="package/lib") + + def package_info(self): + self.cpp_info.libs = [ "json-c" ]