代码拉取完成,页面将自动刷新
from conans import ConanFile, tools, VisualStudioBuildEnvironment
class CommonConan(ConanFile):
name = "SimCenterCommonQt"
version = "0.1.10"
license = "BSD"
author = "Wael Elhaddad (elhaddad@berkeley.edu)"
url = "https://github.com/NHERI-SimCenter/SimCenterCommon.git"
description = "SimCenter Common Qt Library"
settings = "os", "compiler", "build_type", "arch"
generators = "qmake", "cmake"
requires = "jansson/2.13.1", "libcurl/7.72.0"
build_policy = "missing"
options = {
"MDOFwithQt3D": [True, False],
"withQt":[True, False]
}
default_options = {"MDOFwithQt3D": False, "withQt": False}
scm = {
"type": "git",
"url": "auto",
"revision": "auto"
}
def configure(self):
if self.settings.os == "Windows":
self.options["libcurl"].with_winssl = True
self.options["libcurl"].with_openssl = False
if self.options.withQt:
self.options["qt"].qtcharts = True
self.options["qt"].qt3d = True
def build_requirements(self):
if self.settings.os == "Windows":
self.build_requires("jom/1.1.3")
if self.options.withQt:
self.build_requires("qt/5.15.2")
def package_id(self):
del self.info.options.withQt
def build(self):
if self.settings.os == "Windows":
env_build = VisualStudioBuildEnvironment(self)
with tools.environment_append(env_build.vars):
vcvars = tools.vcvars_command(self.settings)
qmake = "%s && qmake" % (vcvars)
makeCommand = "%s && jom" % (vcvars)
else:
qmake = 'qmake'
makeCommand = 'make -j'
qmakeCommand = '%s "CONFIG+=%s" %s/SimCenterCommonQt.pro' % (qmake, str(self.settings.build_type).lower(), self.source_folder)
if(self.options.MDOFwithQt3D):
qmakeCommand += ' "DEFINES+=_GRAPHICS_Qt3D"'
self.run(qmakeCommand, run_environment=True)
self.run(makeCommand, run_environment=True)
def package(self):
self.copy("*.h", src="Common", dst="include", keep_path=False)
self.copy("*.h", src="InputSheetBM", dst="include", keep_path=False)
self.copy("*.h", src="RandomVariables", dst="include", keep_path=False)
self.copy("*/*.h", src="Workflow", dst="include", keep_path=False)
self.copy("*SimCenterCommonQt.lib", dst="lib", keep_path=False)
self.copy("*SimCenterCommonQt.a", dst="lib", keep_path=False)
def package_info(self):
self.cpp_info.libs = ["SimCenterCommonQt"]
此处可能存在不合适展示的内容,页面不予展示。您可通过相关编辑功能自查并修改。
如您确认内容无涉及 不当用语 / 纯广告导流 / 暴力 / 低俗色情 / 侵权 / 盗版 / 虚假 / 无价值内容或违法国家有关法律法规的内容,可点击提交进行申诉,我们将尽快为您处理。