conanfile.py 1.3 KB

123456789101112131415161718192021222324252627282930
  1. class LsStdConan(ConanFile):
  2. name = "ls-std"
  3. version = "2021.1.0"
  4. license = "MIT"
  5. url = "<Package recipe repository url here, for issues about the package>"
  6. description = "This library provides standard functionalities like serialization, json, xml, file operations, boxing, state machine, event handling."
  7. topics = ("serialization", "events", "boxing", "xml", "json", "files", "state machine")
  8. settings = "os", "compiler", "build_type", "arch"
  9. options = {"shared": [True, False]}
  10. default_options = {"shared": False}
  11. generators = "cmake"
  12. def source(self):
  13. self.run("git clone https://vcs.lynarstudios.de/public/ls-standard-library.git --branch v" + self.version + " --single-branch")
  14. def build(self):
  15. cmake = CMake(self)
  16. cmake.configure(source_folder="ls-standard-library")
  17. cmake.build()
  18. def package(self):
  19. self.copy("*.hpp", dst="include", src="ls-standard-library/include")
  20. self.copy("*ls_std_" + self.version + "_static.lib", dst="lib", keep_path=False)
  21. self.copy("*.dll", dst="bin", keep_path=False)
  22. self.copy("*.so", dst="lib", keep_path=False)
  23. self.copy("*.dylib", dst="lib", keep_path=False)
  24. self.copy("*.a", dst="lib", keep_path=False)
  25. def package_info(self):
  26. self.cpp_info.libs = ["ls_std_" + self.version + "_static"]