Add GSSAcquireCred to the JSON protocol description
[gssweb.git] / json_gssapi / cmake_modules / FindCPPUNIT.cmake
1 #
2 # Find the CppUnit includes and library
3 #
4 # This module defines
5 # CPPUNIT_INCLUDE_DIR, where to find tiff.h, etc.
6 # CPPUNIT_LIBRARIES, the libraries to link against to use CppUnit.
7 # CPPUNIT_FOUND, If false, do not try to use CppUnit.
8
9 # also defined, but not for general use are
10 # CPPUNIT_LIBRARY, where to find the CppUnit library.
11 # CPPUNIT_DEBUG_LIBRARY, where to find the CppUnit library in debug
12 # mode.
13
14 SET(CPPUNIT_FOUND "NO")
15
16 FIND_PATH(CPPUNIT_INCLUDE_DIR cppunit/TestCase.h /usr/local/include /usr/include)
17
18 # With Win32, important to have both
19 IF(WIN32)
20   FIND_LIBRARY(CPPUNIT_LIBRARY cppunit
21                ${CPPUNIT_INCLUDE_DIR}/../lib
22                /usr/local/lib
23                /usr/lib)
24   FIND_LIBRARY(CPPUNIT_DEBUG_LIBRARY cppunitd
25                ${CPPUNIT_INCLUDE_DIR}/../lib
26                /usr/local/lib
27                /usr/lib)
28 ELSE(WIN32)
29   # On unix system, debug and release have the same name
30   FIND_LIBRARY(CPPUNIT_LIBRARY cppunit
31                ${CPPUNIT_INCLUDE_DIR}/../lib
32                /usr/local/lib
33                /usr/lib)
34   FIND_LIBRARY(CPPUNIT_DEBUG_LIBRARY cppunit
35                ${CPPUNIT_INCLUDE_DIR}/../lib
36                /usr/local/lib
37                /usr/lib)
38 ENDIF(WIN32)
39
40 IF(CPPUNIT_INCLUDE_DIR)
41   IF(CPPUNIT_LIBRARY)
42     SET(CPPUNIT_FOUND "YES")
43     SET(CPPUNIT_LIBRARIES ${CPPUNIT_LIBRARY} ${CMAKE_DL_LIBS})
44     SET(CPPUNIT_DEBUG_LIBRARIES ${CPPUNIT_DEBUG_LIBRARY} ${CMAKE_DL_LIBS})
45   ELSE (CPPUNIT_LIBRARY)
46     IF (CPPUNIT_FIND_REQUIRED)
47       MESSAGE(SEND_ERROR "Could not find library CppUnit.")
48     ENDIF (CPPUNIT_FIND_REQUIRED)
49   ENDIF(CPPUNIT_LIBRARY)
50 ELSE(CPPUNIT_INCLUDE_DIR)
51   IF (CPPUNIT_FIND_REQUIRED)
52     MESSAGE(SEND_ERROR "Could not find library CppUnit.")
53   ENDIF(CPPUNIT_FIND_REQUIRED)
54 ENDIF(CPPUNIT_INCLUDE_DIR)