Browse Source

Add conanfile.py

pull/866/head
krishna-elear 2 years ago
parent
commit
57388e255f
1 changed files with 37 additions and 0 deletions
  1. +37
    -0
      conanfile.py

+ 37
- 0
conanfile.py View File

@@ -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" ]

Loading…
Cancel
Save