You can not select more than 25 topics Topics must start with a chinese character,a letter or number, can include dashes ('-') and can be up to 35 characters long.

conanfile.py 1.0 kB

12345678910111213141516171819202122232425262728293031323334353637
  1. import fnmatch
  2. from conans import ConanFile, CMake, tools
  3. class JsonclibConan(ConanFile):
  4. name = "json-c"
  5. version = "0.16.99"
  6. description = "JSON-C - A JSON implementation in C"
  7. topics = ("conan", "json-c", "json", "encoding", "decoding", "manipulation")
  8. url = "https://github.com/elear-solutions/json-c"
  9. license = "MIT"
  10. generators = "cmake"
  11. settings = "os", "compiler", "build_type", "arch"
  12. options = {
  13. "shared": [True, False]
  14. }
  15. default_options = {
  16. "shared": False
  17. }
  18. def configure(self):
  19. pass
  20. def build(self):
  21. cmake = CMake(self)
  22. cmake.definitions['BUILD_SHARED_LIBS'] = True
  23. cmake.definitions['BUILD_STATIC_LIBS'] = True
  24. cmake.configure(source_folder=".")
  25. cmake.build()
  26. cmake.install()
  27. def package(self):
  28. self.copy("*.h", dst="include", src="package/include")
  29. self.copy("*", dst="lib", src="package/lib")
  30. def package_info(self):
  31. self.cpp_info.libs = [ "json-c" ]