-
Notifications
You must be signed in to change notification settings - Fork 0
/
conanfile.py
35 lines (30 loc) · 1.46 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
from conans import ConanFile
class QDjangoConan(ConanFile):
name = "QDjango"
version = "0.6.2"
settings = "os", "compiler", "build_type", "arch"
url = "https://github.com/jlaine/qdjango.git"
license = "LGPL"
generators = "qmake", "cmake", "gcc"
folder_name = "qdjango"
def source(self):
self.run( "git clone %s %s" % (self.url, self.folder_name))
self.run( "cd %s && \
git checkout tags/v0.6.2 -b 0.6.2" % self.folder_name)
def build(self):
qmake_build_type = "release"
self.run( "cd %s && mkdir build" % self.folder_name)
if self.settings.build_type == "Debug":
qmake_build_type = "debug"
self.run( "cd %s/build && \
qmake CONFIG+=%s .. && \
make" % (self.folder_name, qmake_build_type))
def package(self):
self.copy( pattern="libqdjango-db.*", dst="lib", src="%s/build/src/db" % self.folder_name)
self.copy( pattern="libqdjango-http.*", dst="lib", src="%s/build/src/http" % self.folder_name)
self.copy( pattern="*.h", dst="include/db", src="%s/src/db" % self.folder_name)
self.copy( pattern="*.h", dst="include/http", src="%s/src/http" % self.folder_name)
# self.copy( pattern="*[!_p].h", dst="src", src="%s/src" % self.folder_name)
def package_info(self):
self.cpp_info.libs.extend(["qdjango-db","qdjango-http"])
self.cpp_info.includedirs.extend([ 'include', 'include/db', 'include/http'])