About cppunit installation and use
I am trying to install the CppUnit in my ubuntu18 by using the two following methods: 1. by terminal: sudo apt-get install libcppunit-dev 2. by using the steps here: link
But when trying to compile using catkin_make, the error shows below: Could not find a package configuration file provided by "cppunit" with any of the following names:
cppunitConfig.cmake
cppunit-config.cmake
Add the installation prefix of "cppunit" to CMAKE_PREFIX_PATH or set "cppunit_DIR" to a directory containing one of the above files. If "cppunit" provides a separate development package or SDK, be sure it has been installed.
Already tried to remove, reinstall, set the path, but no luck of success. I also researched and there is no other dependencies needed. Am I missing something?
Here is my CMakeLists.txt :
cmake_minimum_required(VERSION 2.8.3)
project(project_xx)
add_compile_options(-std=c++11)
set(CMAKE_PREFIX_PATH ${CMAKE_PREFIX_PATH} /usr/local)
find_package(cppunit REQUIRED)
include_directories(${CPPUNIT_INCLUDE_DIR})
catkin_add_gtest(project_xx_test test/project_xx_node_test.cpp)
target_link_libraries(project_xx_test ${catkin_LIBRARIES} ${PROJECT_NAME})
Your thoughts, opinions, and answers are highly appreciated. Thank you!