12345678910111213141516171819202122232425262728293031323334353637383940414243 |
- from conans import ConanFile, CMake
- class LsMathConan(ConanFile):
- name = "ls-math"
- version = "2022.1.0"
- license = "MIT"
- url = "<Package recipe repository url here, for issues about the package>"
- description = "This library provides mathematical functionalities."
- topics = ("vector", "core")
- settings = "os", "compiler", "build_type", "arch"
- options = {"shared": [True, False]}
- default_options = {"shared": False}
- generators = "cmake"
- def source(self):
- self.run("git clone https://vcs.lynarstudios.de/public/ls-math.git --branch v" + self.version +
- " --single-branch")
- def build(self):
- cmake = self.__configure_cmake()
- cmake.build()
- def package(self):
- self.copy("*.hpp", dst="include", src="ls-math/include")
- self.copy("*.lib", dst="lib", keep_path=False)
- self.copy("*.a", dst="lib", keep_path=False)
- self.copy("*.so", dst="lib", keep_path=False)
- self.copy("*.dll", dst="lib", keep_path=False)
- def package_info(self):
- self.cpp_info.libs = ["ls_math_vector"]
- def __configure_cmake(self):
- cmake = CMake(self)
- if self.options.shared:
- cmake.definitions['BUILD_LS_MATH_STATIC'] = "OFF"
- cmake.definitions['BUILD_LS_MATH_SHARED'] = "ON"
- cmake.configure(source_folder="ls-math")
- return cmake
|