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 CMAKEPREFIXPATH 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 :
cmakeminimumrequired(VERSION 2.8.3)
project(project_xx)
addcompileoptions(-std=c++11)
set(CMAKEPREFIXPATH ${CMAKEPREFIXPATH} /usr/local)
find_package(cppunit REQUIRED)
includedirectories(${CPPUNITINCLUDE_DIR})
catkinaddgtest(projectxxtest test/projectxxnode_test.cpp)
targetlinklibraries(projectxxtest ${catkinLIBRARIES} ${PROJECTNAME})
Your thoughts, opinions, and answers are highly appreciated. Thank you!
Asked by anya on 2023-02-06 03:13:22 UTC
Comments