| 1 |
from conans import ConanFile, CMake, tools |
| 2 |
|
| 3 |
|
| 4 |
class DeepinbootmakerConan(ConanFile): |
| 5 |
name = "deepin-boot-maker" |
| 6 |
version = "2.0.4.8" |
| 7 |
license = "<Put the package license here>" |
| 8 |
author = "<Put your name here> <And your email here>" |
| 9 |
url = "<Package recipe repository url here, for issues about the package>" |
| 10 |
description = "<Description of Deepinbootmaker here>" |
| 11 |
topics = ("<Put some tag here>", "<here>", "<and here>") |
| 12 |
settings = "os", "compiler", "build_type", "arch" |
| 13 |
options = {"shared": [True, False]} |
| 14 |
default_options = "shared=False" |
| 15 |
generators = "qmake" |
| 16 |
requires = 'dtkcore/2.0.9@iceyer/stable', 'dtkwidget/2.0.9@iceyer/stable', 'OpenSSL/1.0.2n@conan/stable', 'jom_installer/1.1.2@bincrafters/stable' |
| 17 |
|
| 18 |
def build(self): |
| 19 |
outdir = self.build_folder |
| 20 |
|
| 21 |
env_vars = tools.vcvars_dict(self.settings) |
| 22 |
env_vars['_CL_'] = '/utf-8' |
| 23 |
with tools.environment_append(env_vars): |
| 24 |
command = 'qmake -r' |
| 25 |
command += ' VERSION=%s' % self.version |
| 26 |
|
| 27 |
|
| 28 |
command += ' CONFIG+=release' |
| 29 |
command += ' PREFIX=%s' % outdir |
| 30 |
command += ' DEFINES+=DTK_STATIC_LIB' |
| 31 |
command += ' DTK_STATIC_TRANSLATION=YES' |
| 32 |
command += ' DTK_NO_MULTIMEDIA=YES' |
| 33 |
command += ' %s' % self.source_folder |
| 34 |
self.run(command) |
| 35 |
|
| 36 |
self.run('jom') |
| 37 |
self.run('jom install') |
| 38 |
|
| 39 |
def package(self): |
| 40 |
self.copy("*.h", dst="include", src="hello") |
| 41 |
|
| 42 |
def package_info(self): |
| 43 |
self.cpp_info.libs = ["hello"] |
| 44 |
|