Philip,<br><br>Thanks! I actaully was trying that way. But, changed it. Stupid me.<br><br>I copied the linked script as-is and it worked. It found the lib64 path, with no problem.<br><br>The problem I was having before (that made me try the PKG_CONFIG) was caused by not having the ENABLE_TESTING() macro in the top level CMakeLists.txt. So, make test did nothing.<br>
<br>Thanks again for the fast help.<br><br>_bowerman<br><br><div class="gmail_quote">On Sat, May 17, 2008 at 9:58 AM, Philip Lowman <<a href="mailto:philip@yhbt.com">philip@yhbt.com</a>> wrote:<br><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">
<div class="Ih2E3d">On Sat, May 17, 2008 at 10:28 AM, Michael Bowerman <<a href="mailto:michael.bowerman@gmail.com" target="_blank">michael.bowerman@gmail.com</a>> wrote:<br></div><div class="gmail_quote"><div class="Ih2E3d">
<blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">
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?</blockquote>
</div><div><br>Only if CppUnit is only meant to work only with the GCC compiler or you will only ever use the GCC compiler. If there is a chance you'll want to compile your code with MSVC or some other compiler or you wish to contribute your find modules back to CMake you should consider using the find_library() and find_path() commands to locate the cppunit header files and library.<br>
<br>This is usually fairly simple to do and most people encapsulate this activity in a Find* macro. Looks like someone has already done some work to make a FindCppUnit macro but it never got cleaned up and checked into CMake.<br>
<br><a href="http://www.cmake.org/pipermail/cmake/2006-October/011446.html" target="_blank">http://www.cmake.org/pipermail/cmake/2006-October/011446.html</a><br><br>Just set your CMAKE_MODULE_PATH and call FIND_PACKAGE(CppUnit) and then react accordingly based on the cache variables it provides. You should probably also take advantage of CPPUNIT_FOUND in determining if it's appropriate to build and link the test code.<br>
<br>Depending on how many test executables you have, you may want to make a small macro wrapper that calls ADD_EXECUTABLE() then ADD_TEST() that way you can keep your CMake code to a minimum.<br><br></div></div>-- <br><font color="#888888">Philip Lowman
</font></blockquote></div><br>