PkmnLib/conanfile.py

36 lines
1.2 KiB
Python

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."
settings = "os", "compiler"
options = {"shared": [True, False]}
default_options = {"shared": True}
generators = "cmake"
exports_sources = "*"
compiler = "clang"
requires = \
"CreatureLib/144d17d859e134c17cdb45c32f4a7e4f68eeb7a0@creaturelib/master", \
"AngelScript/2.34@AngelScript/Deukhoofd"
def build(self):
cmake = CMake(self)
cmake.configure()
cmake.build()
def package(self):
self.copy("*.hpp", dst="include", src="src")
self.copy("*.h", 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)
def imports(self):
if self.settings.os == "Windows":
self.copy("*.dll", "bin", "bin")