-
Notifications
You must be signed in to change notification settings - Fork 8
/
conanfile.py
36 lines (30 loc) · 1.25 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
from conans import ConanFile, CMake, tools
class DataStructuresConan(ConanFile):
name = "DataStructures-201"
version = "1.0.0"
license = "GPL License"
author = "Olcay Taner Yildiz [email protected]"
url = "https://github.com/olcaytaner/201-DataStructures-CPP"
description = "Data Structures library for 201 course"
topics = ("")
settings = "os", "compiler", "build_type", "arch"
options = {"shared": [True, False], "fPIC": [True, False]}
default_options = {"shared": False, "fPIC": True}
generators = "cmake"
exports_sources = "src/*", "Test/*"
def config_options(self):
if self.settings.os == "Windows":
del self.options.fPIC
def build(self):
cmake = CMake(self)
cmake.configure(source_folder="src")
cmake.build()
def package(self):
self.copy("*.h", src="src", dst="include")
self.copy("*DataStructures-201.lib", dst="lib", keep_path=False)
self.copy("*.dll", dst="bin", keep_path=False)
self.copy("*.so", dst="lib", keep_path=False)
self.copy("*.dylib", dst="lib", keep_path=False)
self.copy("*.a", dst="lib", keep_path=False)
def package_info(self):
self.cpp_info.libs = ["DataStructures-201"]