I have installed CVB, buildessentials and cmake, but cmake cannot find cvb. The following error message appears when running cmake.
My system Ubuntu 20.04 x64. The CVB named “cvb-13.04.003-ubu2004-x86_64” was installed. The system was rebooted after the installation.
My CMakeLists.txt:
cmake_minimum_required(VERSION 3.5)
project(Vector_GEV)
set (CMAKE_CXX_STANDARD 14)
if(UNIX AND CMAKE_CXX_COMPILER_VERSION VERSION_LESS 9 AND CMAKE_C_COMPILER_VERSION VERSION_LESS 9)
#find boost
FIND_PACKAGE( Boost 1.67 COMPONENTS filesystem REQUIRED )
INCLUDE_DIRECTORIES( ${Boost_INCLUDE_DIR} )
endif()
#find CVB
file(TO_CMAKE_PATH "$ENV{CVB}/cmake" CVB_MODULE_PATH)
set(CMAKE_MODULE_PATH "${CMAKE_MODULE_PATH}" "${CVB_MODULE_PATH}")
find_package(CVB REQUIRED)
add_executable(${PROJECT_NAME} main.cpp )
target_link_libraries(${PROJECT_NAME} CVB::CvbGevServer)
target_compile_features(${PROJECT_NAME} PUBLIC cxx_std_17)
if(UNIX)
target_link_libraries(${PROJECT_NAME} ${Boost_LIBRARIES} -lpthread)
target_link_libraries(${PROJECT_NAME} pthread)
endif()
The Error:
CMake Error at CMakeLists.txt:16 (find_package):
By not providing "FindCVB.cmake" in CMAKE_MODULE_PATH this project has
asked CMake to find a package configuration file provided by "CVB", but
CMake did not find one.
Could not find a package configuration file provided by "CVB" with any of
the following names:
CVBConfig.cmake
cvb-config.cmake
Add the installation prefix of "CVB" to CMAKE_PREFIX_PATH or set "CVB_DIR"
to a directory containing one of the above files. If "CVB" provides a
separate development package or SDK, be sure it has been installed.
-- Configuring incomplete, errors occurred!
I have come across this error a few times in the past. I think that at that time a reinstallation of cvb helped.
But when I look in “/opt/” I find there also cvb with all components, nothing seems to be missing.