一百昏的小白 2021-06-17 13:42 采纳率: 14.3%
浏览 310
已结题

找不到“ vsomeip”提供的软件包配置文件

报错如下: 

CMake Error at CMakeLists.txt:5 (find_package):
  By not providing "Findvsomeip.cmake" in CMAKE_MODULE_PATH this project has
  asked CMake to find a package configuration file provided by "vsomeip", but
  CMake did not find one.
 
  Could not find a package configuration file provided by "vsomeip"
  (requested version 2.6.0) with any of the following names:
    vsomeipConfig.cmake
    vsomeip-config.cmake
 
  Add the installation prefix of "vsomeip" to CMAKE_PREFIX_PATH or set
  "vsomeip_DIR" to a directory containing one of the above files.  If
  "vsomeip" provides a separate development package or SDK, be sure it has
  been installed.
 
 
-- Configuring incomplete, errors occurred!
See also "/home/kesab/connectivity-vsomeip/req_resp/build/CMakeFiles/CMakeOutput.log".

CMakeLists.txt文件如下 

cmake_minimum_required (VERSION 2.8.7)
 
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -std=c++11")

PROJECT(service-client)
set(vsomeip_DIR/home/ygd/vsomeip)
#find_package(Threads REQUIRED)
find_package (vsomeip 2.6.0 REQUIRED)
find_package( Boost 1.55 COMPONENTS system thread log REQUIRED )
include_directories (
    ${Boost_INCLUDE_DIR}
    ${VSOMEIP_INCLUDE_DIRS}
)

    add_executable(service-example ../src/service-example.cpp) 
    target_link_libraries(service-example vsomeip ${Boost_LIBRARIES})
    add_executable (client-example ../src/client-example.cpp)
    target_link_libraries(client-example vsomeip ${Boost_LIBRARIES})



文件结构如下:

├── build
├── CMakeLists.txt
│   
└── src
    ├── service-example.cpp
    └── client-example.cpp
  • 写回答

2条回答 默认 最新

  • qfl_sdu 2021-06-17 13:53
    关注

    需要安装vsomeip,下载地址https://gitee.com/mirrors/vsomeip

    编译和安装方法在连接中也有,安装完成后,把路径添加到CMAKE_PREFIX_PATH,然后重新编译即可。

    本回答被题主选为最佳回答 , 对您是否有帮助呢?
    评论
查看更多回答(1条)

报告相同问题?

悬赏问题

  • ¥15 关于#python#的问题:求帮写python代码
  • ¥20 MATLAB画图图形出现上下震荡的线条
  • ¥15 LiBeAs的带隙等于0.997eV,计算阴离子的N和P
  • ¥15 关于#windows#的问题:怎么用WIN 11系统的电脑 克隆WIN NT3.51-4.0系统的硬盘
  • ¥15 来真人,不要ai!matlab有关常微分方程的问题求解决,
  • ¥15 perl MISA分析p3_in脚本出错
  • ¥15 k8s部署jupyterlab,jupyterlab保存不了文件
  • ¥15 ubuntu虚拟机打包apk错误
  • ¥199 rust编程架构设计的方案 有偿
  • ¥15 回答4f系统的像差计算