conanfile.py 1.4 KB

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