报错如下:
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