2019-12-19 15:09:02 +00:00
|
|
|
from conans import ConanFile, CMake
|
2019-12-19 13:22:44 +00:00
|
|
|
|
|
|
|
|
2019-12-19 15:49:47 +00:00
|
|
|
class CreatureLibConan(ConanFile):
|
2019-12-19 13:22:44 +00:00
|
|
|
name = "CreatureLib"
|
|
|
|
license = "TODO"
|
|
|
|
url = "https://git.p-epsilon.com/Deukhoofd/CreatureLib"
|
|
|
|
description = "The core implementation for turn based battling using creatures."
|
2019-12-21 13:32:45 +00:00
|
|
|
settings = "compiler"
|
2020-01-01 12:02:00 +00:00
|
|
|
options = {"shared": [True, False], "windows": [True, False]}
|
|
|
|
default_options = {"shared": True, "windows": False}
|
2019-12-19 13:22:44 +00:00
|
|
|
generators = "cmake"
|
|
|
|
exports_sources = "*"
|
2019-12-21 13:32:45 +00:00
|
|
|
compiler = "clang"
|
2019-12-19 13:22:44 +00:00
|
|
|
|
|
|
|
def build(self):
|
|
|
|
cmake = CMake(self)
|
2020-01-01 12:02:00 +00:00
|
|
|
cmake.definitions["WINDOWS"] = self.settings.get_safe("windows")
|
2019-12-19 15:49:47 +00:00
|
|
|
cmake.configure()
|
2019-12-19 13:22:44 +00:00
|
|
|
cmake.build()
|
|
|
|
|
|
|
|
# Explicit way:
|
|
|
|
# self.run('cmake "%s/src" %s' % (self.source_folder, cmake.command_line))
|
|
|
|
# self.run("cmake --build . %s" % cmake.build_config)
|
|
|
|
|
|
|
|
def package(self):
|
2019-12-26 10:30:16 +00:00
|
|
|
self.copy("*.hpp", dst="include", src="src")
|
2019-12-28 13:58:09 +00:00
|
|
|
self.copy("*.so", dst="lib", keep_path=True)
|
2019-12-19 13:22:44 +00:00
|
|
|
|
|
|
|
def package_info(self):
|
2019-12-26 13:17:10 +00:00
|
|
|
self.cpp_info.libs = ["CreatureLibCore", "CreatureLibLibrary", "CreatureLibBattling"]
|