cmake/modules/Findasio.cmake:11 处的 CMake 错误 - 无法找到 ASIO 依赖项
CMake Error at cmake/modules/Findasio.cmake:11 - Failed to locate ASIO dependency
我正在尝试在 visual studio 2015 项目中使用 restbed framework
。
我克隆了 restbed 存储库:https://github.com/Corvusoft/restbed.git
为了创建一个 Visual studio 项目文件,我使用的是当前 cmake 3.8.1 版本
现在,当尝试使用 cmake 配置 restbed 时,我收到此错误:
Copyright 2013-2017, Corvusoft Ltd, All Rights Reserved.
CMake Error at cmake/modules/Findasio.cmake:11 (message):
Failed to locate ASIO dependency.
Call Stack (most recent call first):
CMakeLists.txt:31 (find_package)
有没有办法解决这个 Asio 问题?
现在我正在尝试编译 Boost library 以查看在哪里可以找到并将这些 Asio 依赖项添加到 Cmake。
CMakeLists.txt 休息床文件的内容:
line
26 #
27 # Dependencies
28 #
29 set( CMAKE_MODULE_PATH ${CMAKE_MODULE_PATH} "${PROJECT_SOURCE_DIR}/cmake/modules" )
30
31 find_package( asio REQUIRED )
32 include_directories( SYSTEM ${asio_INCLUDE} )
CMake(配置)输出:
The CXX compiler identification is MSVC 19.0.24215.1
Check for working CXX compiler: F:/Program Files (x86)/Microsoft Visual
Studio 14.0/VC/bin/x86_amd64/cl.exe
Check for working CXX compiler: F:/Program Files (x86)/Microsoft Visual
Studio 14.0/VC/bin/x86_amd64/cl.exe -- works
Detecting CXX compiler ABI info
Detecting CXX compiler ABI info - done
Detecting CXX compile features
Detecting CXX compile features - done
Copyright 2013-2017, Corvusoft Ltd, All Rights Reserved.
CMake Error at cmake/modules/Findasio.cmake:11 (message):
Failed to locate ASIO dependency.
Call Stack (most recent call first):
CMakeLists.txt:31 (find_package)
Configuring incomplete, errors occurred!
See also "C:/Users/xxx/Documents/Visual Studio 2015/Projects/thread_Native_Handle/resbed_windows/CMakeFiles/CMakeOutput.log".
Asio(不要与 boost asio 混淆)在 restbed 存储库中 included 作为 Git 子模块。 CMake 应该在第一个 运行 时自动找到 Asio 的 headers。克隆项目后,您可能忘记了 运行 git submodule init
和 git submodule update
。 运行 您克隆 restbed 的目录中的那些命令,并且构建应该开始工作。
如果您确实需要将 restbed 指向特定的 asio 安装,根据 this file,只需将 CMake 变量 asio_INCLUDE
设置为包含 asio.hpp
.
的目录
您是否遵循了自述文件中的说明?
git clone --recursive https://github.com/corvusoft/restbed.git
mkdir restbed/build
cd restbed/build
cmake [-DBUILD_TESTS=YES] [-DBUILD_EXAMPLES=YES] [-DBUILD_SSL=NO] [-DBUILD_SHARED=YES] [-DCMAKE_INSTALL_PREFIX=/output-directory] ..
make [-j CPU_CORES+1] install
make test
您收到此错误是因为未安装 asio 库。
从 https://think-async.com/Asio/
下载、构建和安装 asio 库
./configure --without-boost
make
sudo make install
然后下载restbed并构建
git clone https://github.com/Corvusoft/restbed.git
mkdir restbed/build
cd restbed/build
cmake -D BUILD_SSL=OFF -D BUILD_TESTS=OFF -D BUILD_STATIC=ON -D BUILD_SHARED=OFF ..
make
make install
我正在尝试在 visual studio 2015 项目中使用 restbed framework
。
我克隆了 restbed 存储库:https://github.com/Corvusoft/restbed.git
为了创建一个 Visual studio 项目文件,我使用的是当前 cmake 3.8.1 版本
现在,当尝试使用 cmake 配置 restbed 时,我收到此错误:
Copyright 2013-2017, Corvusoft Ltd, All Rights Reserved.
CMake Error at cmake/modules/Findasio.cmake:11 (message):
Failed to locate ASIO dependency.
Call Stack (most recent call first):
CMakeLists.txt:31 (find_package)
有没有办法解决这个 Asio 问题?
现在我正在尝试编译 Boost library 以查看在哪里可以找到并将这些 Asio 依赖项添加到 Cmake。
CMakeLists.txt 休息床文件的内容:
line
26 #
27 # Dependencies
28 #
29 set( CMAKE_MODULE_PATH ${CMAKE_MODULE_PATH} "${PROJECT_SOURCE_DIR}/cmake/modules" )
30
31 find_package( asio REQUIRED )
32 include_directories( SYSTEM ${asio_INCLUDE} )
CMake(配置)输出:
The CXX compiler identification is MSVC 19.0.24215.1
Check for working CXX compiler: F:/Program Files (x86)/Microsoft Visual
Studio 14.0/VC/bin/x86_amd64/cl.exe
Check for working CXX compiler: F:/Program Files (x86)/Microsoft Visual
Studio 14.0/VC/bin/x86_amd64/cl.exe -- works
Detecting CXX compiler ABI info
Detecting CXX compiler ABI info - done
Detecting CXX compile features
Detecting CXX compile features - done
Copyright 2013-2017, Corvusoft Ltd, All Rights Reserved.
CMake Error at cmake/modules/Findasio.cmake:11 (message):
Failed to locate ASIO dependency.
Call Stack (most recent call first):
CMakeLists.txt:31 (find_package)
Configuring incomplete, errors occurred!
See also "C:/Users/xxx/Documents/Visual Studio 2015/Projects/thread_Native_Handle/resbed_windows/CMakeFiles/CMakeOutput.log".
Asio(不要与 boost asio 混淆)在 restbed 存储库中 included 作为 Git 子模块。 CMake 应该在第一个 运行 时自动找到 Asio 的 headers。克隆项目后,您可能忘记了 运行 git submodule init
和 git submodule update
。 运行 您克隆 restbed 的目录中的那些命令,并且构建应该开始工作。
如果您确实需要将 restbed 指向特定的 asio 安装,根据 this file,只需将 CMake 变量 asio_INCLUDE
设置为包含 asio.hpp
.
您是否遵循了自述文件中的说明?
git clone --recursive https://github.com/corvusoft/restbed.git
mkdir restbed/build
cd restbed/build
cmake [-DBUILD_TESTS=YES] [-DBUILD_EXAMPLES=YES] [-DBUILD_SSL=NO] [-DBUILD_SHARED=YES] [-DCMAKE_INSTALL_PREFIX=/output-directory] ..
make [-j CPU_CORES+1] install
make test
您收到此错误是因为未安装 asio 库。
从 https://think-async.com/Asio/
下载、构建和安装 asio 库./configure --without-boost
make
sudo make install
然后下载restbed并构建
git clone https://github.com/Corvusoft/restbed.git
mkdir restbed/build
cd restbed/build
cmake -D BUILD_SSL=OFF -D BUILD_TESTS=OFF -D BUILD_STATIC=ON -D BUILD_SHARED=OFF ..
make
make install