柯南软件包管理器

Conan是一款 C/C++ 包管理器,可加速将 C 或 C++ 库集成到自己的项目中。它适用于所有支持的开发平台

Conan 可以集成到大多数集成到Qt Creator 的构建系统中:

Conan 的客户端-服务器架构使客户端能够从远程服务器获取软件包,并将其上传到作为软件包存储空间的远程服务器。客户端创建软件包,并在必要时从源代码中构建软件包。由于客户端有一个用于存储软件包的本地缓存,因此只要不需要从远程服务器获取新软件包,就可以离线工作。

要使用 Conan,请使用 Qt Online Installer或操作系统提供的工具安装。例如,在 Windows 系统中,可以使用choco install conanpip install conan 命令。

注意: 启用 Conan 插件才能使用它。

您必须为每个项目编写一个conanfile.pyconanfile.txt文件,指定所需的库和软件包。然后,必须编辑项目的构建设置,指定文件的位置和 Conan 安装命令的内容。

自动设置软件包管理器

要自动设置 Conan 软件包管理器以便与 CMake 配合使用,请访问Projects >Project Settings >CMake ,然后选择Package manager auto setup

要关闭自动软件包管理器设置,请在CMake 预设CMakeLists.txt.shared文件中将PackageManagerAutoSetup 设置为false

另请参阅 柯南构建配置》、《启用和禁用插件》、《覆盖项目的 CMake 设置》和《与软件包管理器一起使用 CMake》。

Copyright © The Qt Company Ltd. and other contributors. Documentation contributions included herein are the copyrights of their respective owners. The documentation provided herein is licensed under the terms of the GNU Free Documentation License version 1.3 as published by the Free Software Foundation. Qt and respective logos are trademarks of The Qt Company Ltd in Finland and/or other countries worldwide. All other trademarks are property of their respective owners.