-
Notifications
You must be signed in to change notification settings - Fork 0
/
conanfile.py
44 lines (38 loc) · 1.66 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
from conans import ConanFile, CMake
class YoutubeListDownloaderConan(ConanFile):
name = "youtube_list_downloader"
version = "1.0.1"
license = "MIT"
author = "Linus Kloeckner ([email protected])"
url = "https://github.com/Linux13524/YoutubeListDownloader"
description = "Multiplatform library for downloading Youtube content"
homepage = "https://www.linux13524.de"
topics = ("youtube", "download", "video", "playlist", "channel")
settings = "os", "compiler", "build_type", "arch"
options = {"shared": [True, False], "fPIC": [True, False]}
default_options = "shared=False", "fPIC=True"
requires = "boost/1.69.0@conan/stable", "cpr/1.3.0@linux13524/stable", \
"youtube_decipher/1.0.1@linux13524/stable", "sqlitecpp/2.3.0@linux13524/stable"
generators = "cmake"
exports = ["LICENSE.md"]
exports_sources = "package/*"
def configure(self):
if self.settings.compiler == 'Visual Studio':
del self.options.fPIC
def build(self):
cmake = CMake(self)
cmake.configure(source_folder="package")
cmake.build()
def package(self):
cmake = CMake(self)
cmake.configure(source_folder="package")
cmake.install()
# Copy sources for debugging
if self.settings.build_type == "Debug":
self.copy("*.cpp", dst="src", src="package/src")
# Copy the license files
self.copy("LICENSE.md", dst="licenses")
def package_info(self):
LIB_POSTFIX = "-d" if self.settings.build_type == "Debug" else ""
self.cpp_info.libs = ["YoutubeListDownloader" + LIB_POSTFIX]
self.cpp_info.srcdirs = "src"