VCPKG CMAKE没有找到植物
vcpkg cmake does not find botan
我使用 vcpkg 作为我的包管理器,按照示例,使用 sqlite 构建示例非常容易。
之后我成功安装了 botan 并尝试使用find_package(botan REQUIRED)
,如此处的示例所示。 然而不幸的是,这不起作用,并且生成退出并出现错误
CMake Error at vcpkg/scripts/buildsystems/vcpkg.cmake:247 (_find_package):
By not providing "Findbotan.cmake" in CMAKE_MODULE_PATH this project has
asked CMake to find a package configuration file provided by "botan", but
CMake did not find one.
Could not find a package configuration file provided by "botan" with any of
the following names:
botanConfig.cmake
botan-config.cmake
Add the installation prefix of "botan" to CMAKE_PREFIX_PATH or set
"botan_DIR" to a directory containing one of the above files. If "botan"
provides a separate development package or SDK, be sure it has been
installed.
Call Stack (most recent call first):
CMakeLists.txt:4 (find_package
CMakeLists.txt如下所示
cmake_minimum_required(VERSION 3.0)
project(botanTest)
find_package(botan REQUIRED)
add_executable(main main.cpp)
target_link_libraries(main botan)
有没有办法构建一个依赖于带有 cmake 和 vcpkg 的 botan 的应用程序?如果不是为了cmake,如何将博坦用作vcpkg包?对位置进行硬编码不是一个可行的解决方案。
谢谢四个你的帮助。
> vcpkg 不提供构建和安装的 Botan 的配置文件。
您必须直接在CMake项目中使用find_path((和find_library((,或者编写一个可以通过find_package((调用找到的FindBotan.cmake文件。在这个 FindBotan.cmake 中,您仍然需要使用 find_path(( 和 find_library(( 以及出现在 Find 模块中的其他一些常用样板。
如果你在互联网上搜索,你已经可以找到一些版本的FindBotan.cmake,但它们都不是官方的。
相关文章:
- 如何创建一个CMake变量,除非显式重写,否则使用默认值
- 使用C++库在Android项目中修改gradle中的cmake参数,用于插入指令的测试
- CMake-按正确顺序将项目与C运行时对象文件链接
- 使用CMake创建QML插件
- cmake如何在fedora工作站中找到boost静态库包
- 使用CMake检测支持的C++标准
- CMake项目Boost库错误:Boost/config/compiler/gcc.hpp:165:10:致命错误:cs
- 如何使用CMake编译.proto文件来生成.grpcp.pb.cc和.grpc.pb.h文件
- cmake在我的项目中所需的所有静态库都不成功
- 在CMakeLists.txt的安装功能中使用.cmake文件有什么用
- 无法链接 CMake 中的本地库
- libssh 的函数在构建 libssh 时无法在 Qt 和 cmake 错误中找到
- 如何在Ubuntu中使用cmake设置qt4
- 使用cmake从源代码构建MySQL连接器/C++失败(与以前的声明冲突)
- Vcpkg Pango CMake 构建失败缺少头文件
- VCPKG CMAKE没有找到植物
- 在Windows上设置CMake和vcpkg时出错"无法打开包含文件"
- 在 CMake 和 vcpkg 中找不到 GLFW 目录
- vcpkg 在安装软件包时找不到 cmake.cmd
- cmake 找不到随 vcpkg 一起安装的库