Switched from autotools to CMake.
[libsex.git] / CMakeModules / FindCPPUNIT.cmake
blobdea006fe4960cf8b172ee4189301fb1f120f11ac
1 # Searches for 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.")
24         ENDIF(CPPUNIT_FIND_REQUIRED)
25 ENDIF(NOT CPPUNIT_FOUND)