Prepared release.
[libsex.git] / CMakeModules / FindCPPUNIT.cmake
blob4c411e5d84b8cca5c8b7523a21043ba4930a74a5
1 # Searches CppUnit.
3 # Handles REQUIRED argument properly.
5 # The following variables will be set, if found:
6 # - CPPUNIT_FOUND
7 # - CPPUNIT_INCLUDE_DIR
8 # - CPPUNIT_LIBRARIES
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)
19 IF(NOT CPPUNIT_FOUND)
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, testing not possible.")
24         ENDIF(CPPUNIT_FIND_REQUIRED)
25 ELSE(NOT CPPUNIT_FOUND)
26         MESSAGE(STATUS "Found CppUnit: ${CPPUNIT_INCLUDE_DIR}, ${CPPUNIT_LIBRARIES}.")
27 ENDIF(NOT CPPUNIT_FOUND)