PkmnLib/conanfile.py

37 lines
1.2 KiB
Python
Raw Normal View History

2019-12-29 14:29:52 +00:00
from conans import ConanFile, CMake
class PkmnLibConan(ConanFile):
name = "PkmnLib"
license = "TODO"
url = "https://git.p-epsilon.com/Deukhoofd/CreatureLib"
description = "The core implementation for turn based battling using creatures."
2020-01-01 18:59:47 +00:00
settings = "os", "compiler"
2019-12-29 14:29:52 +00:00
options = {"shared": [True, False]}
default_options = {"shared": True}
generators = "cmake"
exports_sources = "*"
compiler = "clang"
requires = "CreatureLib/b98b470f0dd9e0cc1d7452d5fae4fcdfec2f7cba@creaturelib/master"
2019-12-29 14:29:52 +00:00
def build(self):
cmake = CMake(self)
cmake.configure()
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("*.lib", dst="lib", keep_path=False)
self.copy("*.dll", dst="bin", keep_path=False)
self.copy("*.dylib*", dst="lib", keep_path=False)
self.copy("*.so", dst="lib", keep_path=False)
self.copy("*.a", dst="lib", keep_path=False)
2020-01-01 18:59:47 +00:00
def imports(self):
if self.settings.os == "Windows":
self.copy("*.dll", "bin", "bin")