-
Notifications
You must be signed in to change notification settings - Fork 0
/
conanfile.py
52 lines (39 loc) · 1.53 KB
/
conanfile.py
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
from conans import ConanFile, CMake
class KamiConan(ConanFile):
name = "kami"
version = "0.7.2"
license = "MIT"
author = "James P. Howard, II <[email protected]>"
url = "https://github.com/jhuapl/kami"
description = "Agent-Based Modeling in Modern C++"
topics = ("agent-based modeling", "simulation", "orms")
settings = "os", "compiler", "build_type", "arch"
generators = "cmake", "cmake_find_package"
exports_sources = "*"
options = {"shared": [True, False], "fPIC": [True, False]}
default_options = {"shared": False, "fPIC": False}
def _configure_cmake(self):
cmake = CMake(self)
cmake.definitions["BUILD_SHARED_LIBS"] = self.options.shared
cmake.configure()
return cmake
def build(self):
cmake = CMake(self) # it will find the packages by using our auto-generated FindXXX.cmake files
cmake.definitions["BUILD_SHARED_LIBS"] = self.options.shared
cmake.configure()
cmake.build()
def package(self):
cmake = self._configure_cmake()
cmake.install()
def package_info(self):
# These libraries are required when using the
# following generators:
# cmake, cmake_paths, cmake_
self.cpp_info.libs = ["kami"]
def requirements(self):
self.requires("fmt/9.0.0")
self.requires("spdlog/1.10.0")
self.requires("cli11/2.2.0")
self.requires("neargye-semver/0.3.0")
self.requires("gtest/cci.20210126")
self.requires("nlohmann_json/3.11.1")