About cppunit installation and use

asked 2023-02-06 02:13:22 -0500

anya gravatar image

updated 2023-02-06 02:14:19 -0500

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:


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)




find_package(cppunit REQUIRED)


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!

edit retag flag offensive close merge delete