CreatureLib/conanfile.py

32 lines
1.1 KiB
Python
Raw Normal View History

2019-12-19 15:09:02 +00:00
from conans import ConanFile, CMake
2019-12-19 13:22:44 +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."
settings = "compiler"
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 = "*"
compiler = "clang"
2019-12-19 13:22:44 +00:00
def build(self):
cmake = CMake(self)
cmake.definitions["WINDOWS"] = self.settings.get_safe("windows")
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):
self.copy("*.hpp", dst="include", src="src")
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"]