List,<br><br>I am trying to use cppunit for my automated tests. I have the project compiling with autotools. But, I am moving to cmake to build on windows (while the project is still small-ish).<br><br>So, is the proper way to look for CppUnit to use pkg_check_modules?<br>
<br>cppunit exists in /usr/include/cppunit/, which is included via "#include <cppunit/$HEADER_HERE>. So, the headers should be found in the normal system path.<br><br>However, the libraries need to be linked with -lcppunit. I get this error whent pkg_check_modules is run. Also, the messages are empty:<br>
CMake Error in tests/Dom/common/CMakeLists.txt:<br> Cannot find source file "cppunit". Tried extensions .c .C .c++ .cc .cpp<br> .cxx .m .M .mm .h .hh .h++ .hm .hpp .hxx .in .txx<br><br>If I run pkg-config cppunit --libs from the command line, I get: -lcppunit. I can also run cppunit-config --libs successfully.<br>
<br>Any help would be appreciated. I couldn't find much info searching, and most of what I found seems to be a little old.<br><br>_bowerman<br><br>INCLUDE(FindPkgConfig)<br><br>PKG_CHECK_MODULES(CPPUNIT REQUIRED cppunit )<br>
MESSAGE( "CPPUNIT_INCLUDE_DIRS : ${CPPUNIT_INCLUDE_DIRS}" )<br>MESSAGE( "CPPUNIT_LIBRARY_DIRS : ${CPPUNIT_LIBRARY_DIRS}" )<br>MESSAGE( "CPPUNIT_LIBRARIES : ${CPPUNIT_LIBRARIES}" )<br><br><br>
#IF( CPPUNIT_FOUND AND BUILD_TESTS )<br> ENABLE_TESTING()<br> ADD_SUBDIRECTORY( Inf )<br> ADD_SUBDIRECTORY( Dom )<br>#ENDIF( CPPUNIT_FOUND AND BUILD_TESTS )<br><br><br>