|
@@ -5,31 +5,38 @@ class LsStdConan(ConanFile):
|
|
|
name = "ls-std"
|
|
|
version = "2021.2.0"
|
|
|
license = "MIT"
|
|
|
- url = "<Package recipe repository url here, for issues about the package>"
|
|
|
+ url = "https://vcs.lynarstudios.de/public/ls-standard-library.git"
|
|
|
description = "This library provides standard functionalities like serialization, json, xml, file operations, " \
|
|
|
"boxing, state machine, event handling."
|
|
|
topics = ("serialization", "events", "boxing", "xml", "json", "files", "state machine")
|
|
|
settings = "os", "compiler", "build_type", "arch"
|
|
|
- options = {"shared": [True, False]}
|
|
|
- default_options = {"shared": False}
|
|
|
+ options = {"shared": [True, False], "static": [True, False]}
|
|
|
+ default_options = {"shared": False, "static": True}
|
|
|
generators = "cmake"
|
|
|
|
|
|
def source(self):
|
|
|
- self.run("git clone https://vcs.lynarstudios.de/public/ls-standard-library.git --branch v" + self.version +
|
|
|
- " --single-branch")
|
|
|
+ self.run("git clone " + self.url + " --branch v" + self.version + " --single-branch")
|
|
|
|
|
|
def build(self):
|
|
|
cmake = CMake(self)
|
|
|
+
|
|
|
+ if self.options.shared:
|
|
|
+ cmake.definitions["LS_STD_BUILD_SHARED"] = "ON"
|
|
|
+ cmake.definitions["LS_STD_BUILD_STATIC"] = "OFF"
|
|
|
+
|
|
|
cmake.configure(source_folder="ls-standard-library")
|
|
|
- cmake.build()
|
|
|
+ self.run("cmake --build . --config Release")
|
|
|
|
|
|
def package(self):
|
|
|
self.copy("*.hpp", dst="include", src="ls-standard-library/include")
|
|
|
- self.copy("*ls_std_" + self.version + "_static.lib", dst="lib", keep_path=False)
|
|
|
- self.copy("*.dll", dst="bin", keep_path=False)
|
|
|
+ self.copy("*.lib", dst="lib", keep_path=False)
|
|
|
+ self.copy("*.dll", dst="lib", keep_path=False)
|
|
|
self.copy("*.so", dst="lib", keep_path=False)
|
|
|
self.copy("*.dylib", dst="lib", keep_path=False)
|
|
|
self.copy("*.a", dst="lib", keep_path=False)
|
|
|
|
|
|
def package_info(self):
|
|
|
- self.cpp_info.libs = ["ls_std_" + self.version + "_static"]
|
|
|
+ if self.options.shared:
|
|
|
+ self.cpp_info.libs = ["ls_std_" + self.version + "_shared"]
|
|
|
+ else:
|
|
|
+ self.cpp_info.libs = ["ls_std_" + self.version + "_static"]
|