1 # Searches for CppUnit.
3 # Handles REQUIRED argument properly.
5 # The following variables will be set, if found:
7 # - CPPUNIT_INCLUDE_DIR
12 FIND_PATH(CPPUNIT_INCLUDE_DIR cppunit/TestCase.h ${CMAKE_SYSTEM_INCLUDE_PATH})
13 FIND_LIBRARY(CPPUNIT_LIBRARIES cppunit ${CMAKE_SYSTEM_LIBRARY_PATH})
15 IF(CPPUNIT_INCLUDE_DIR AND CPPUNIT_LIBRARIES)
16 SET(CPPUNIT_FOUND true)
17 ENDIF(CPPUNIT_INCLUDE_DIR AND CPPUNIT_LIBRARIES)
20 IF(CPPUNIT_FIND_REQUIRED)
21 MESSAGE(FATAL_ERROR "Required library CppUnit not found.")
22 ELSE(CPPUNIT_FIND_REQUIRED)
23 MESSAGE(STATUS, "CppUnit not found.")
24 ENDIF(CPPUNIT_FIND_REQUIRED)
25 ENDIF(NOT CPPUNIT_FOUND)