conanfile.py 1.4 KB

123456789101112131415161718192021222324252627282930313233
  1. from conans import ConanFile, CMake, tools
  2. class LsStdConan(ConanFile):
  3. name = "ls-std"
  4. version = "2021.1.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, boxing, state machine, event handling."
  8. topics = ("serialization", "events", "boxing", "xml", "json", "files", "state machine")
  9. settings = "os", "compiler", "build_type", "arch"
  10. options = {"shared": [True, False]}
  11. default_options = {"shared": False}
  12. generators = "cmake"
  13. def source(self):
  14. self.run("git clone https://vcs.lynarstudios.de/public/ls-standard-library.git --branch v" + self.version + " --single-branch")
  15. def build(self):
  16. cmake = CMake(self)
  17. cmake.configure(source_folder="ls-standard-library")
  18. cmake.build()
  19. def package(self):
  20. self.copy("*.hpp", dst="include", src="ls-standard-library/include")
  21. self.copy("*ls_std_2021.1.0_static.lib", dst="lib", keep_path=False)
  22. self.copy("*.dll", dst="bin", keep_path=False)
  23. self.copy("*.so", dst="lib", keep_path=False)
  24. self.copy("*.dylib", dst="lib", keep_path=False)
  25. self.copy("*.a", dst="lib", keep_path=False)
  26. def package_info(self):
  27. self.cpp_info.libs = ["ls_std_2021.1.0_static"]