conanfile.py 1.0 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243
  1. from conans import ConanFile, CMake, tools
  2. import os
  3. class QtProtobufConan(ConanFile):
  4. name = "microjson"
  5. version = "0.1.0"
  6. license = "MIT"
  7. url = "https://github.com/semlanik/microjson"
  8. description = ("Tiny and simple JSON parser")
  9. topics = ("conan", "json")
  10. settings = "os", "compiler", "build_type", "arch"
  11. homepage = "https://github.com/semlanik/microjson"
  12. generators = "cmake"
  13. options = {"shared": [True, False]}
  14. default_options = {
  15. "shared": True,
  16. }
  17. scm = {
  18. "type": "git",
  19. "url": "auto",
  20. "revision": "auto",
  21. }
  22. exports_sources = "*"
  23. def _configure_cmake(self):
  24. cmake = CMake(self)
  25. cmake.definitions["MICROJSON_MAKE_TESTS"] = "OFF"
  26. cmake.configure()
  27. return cmake
  28. def build(self):
  29. cmake = self._configure_cmake()
  30. cmake.build()
  31. cmake.install()
  32. def package(self):
  33. cmake = self._configure_cmake()
  34. cmake.configure()
  35. cmake.install()
  36. self.copy("LICENSE", dst="licenses")