素材巴巴 > 程序开发 >

QtCreator 4.10.1的qconan v0.2.0插件

程序开发 2023-08-31 15:52:59

1、安装

        关闭QtCreator;

        复制libconan.so(见附件)到${QTC_ROOT}/lib/qtcreator/plugins/;

        启动QtCreator;

        在帮助->关于插件中查看conan已启动。

图1

 

图2

2、Qt项目配置

        a、在工程目录下创建conanfile.py,示例如下:

from conans import ConanFile, tools
 class ScpToolConan(ConanFile):name = "scp-tool"version = "1.2.11"settings = "os", "compiler", "build_type", "arch"description = "zlib for x86_64"requires = "libthrift-cpp-extension/0.13.0@lanxum/testing", "scp-rpc/1.2.0@lanxum/testing" # 此处配置conan仓库的软件依赖url = "None"license = "None"author = "None"topics = "None"def package(self):self.copy("*", symlinks=True)def package_info(self):self.cpp_info.libs = tools.collect_libs(self)

        b、 在.pro工程文件中配置编译脚本,示例如下:

for (path, $$list($$(CPPFLAGS))) {INCLUDEPATH += $$path
 }for (path, $$list($$(LDFLAGS))) {LIBS += $$path
 }LIBS += -lthrift-cpp-extension -lscp-rpc -lthrift -lsm4-cipher -lboost_system


标签:

素材巴巴 Copyright © 2013-2021 http://www.sucaibaba.com/. Some Rights Reserved. 备案号:备案中。