1 Star 0 Fork 0

Veenxz/SimCenterCommon

加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
文件
该仓库未声明开源许可证文件(LICENSE),使用请关注具体项目描述及其代码上游依赖。
克隆/下载
conanfile.py 2.61 KB
一键复制 编辑 原始数据 按行查看 历史
fmckenna 提交于 2021-03-31 09:15 . fmk - removing bincrafters packages
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"]
马建仓 AI 助手
尝试更多
代码解读
代码找茬
代码优化
1
https://gitee.com/veenxz/SimCenterCommon.git
git@gitee.com:veenxz/SimCenterCommon.git
veenxz
SimCenterCommon
SimCenterCommon
master

搜索帮助

0d507c66 1850385 C8b1a773 1850385