- Add $Id: $ tags
[obnox/wireshark/wip.git] / cmake / modules / FindADNS.cmake
1 #
2 # $Id$
3 #
4 # - Find adns
5 # Find the native ADNS includes and library
6 #
7 #  ADNS_INCLUDE_DIRS - where to find adns.h, etc.
8 #  ADNS_LIBRARIES    - List of libraries when using adns.
9 #  ADNS_FOUND        - True if adns found.
10
11
12 IF (ADNS_INCLUDE_DIRS)
13   # Already in cache, be silent
14   SET(ADNS_FIND_QUIETLY TRUE)
15 ENDIF (ADNS_INCLUDE_DIRS)
16
17 FIND_PATH(ADNS_INCLUDE_DIR adns.h)
18
19 SET(ADNS_NAMES adns)
20 FIND_LIBRARY(ADNS_LIBRARY NAMES ${ADNS_NAMES} )
21
22 # handle the QUIETLY and REQUIRED arguments and set ADNS_FOUND to TRUE if 
23 # all listed variables are TRUE
24 INCLUDE(FindPackageHandleStandardArgs)
25 FIND_PACKAGE_HANDLE_STANDARD_ARGS(ADNS DEFAULT_MSG ADNS_LIBRARY ADNS_INCLUDE_DIR)
26
27 IF(ADNS_FOUND)
28   SET( ADNS_LIBRARIES ${ADNS_LIBRARY} )
29   SET( ADNS_INCLUDE_DIRS ${ADNS_INCLUDE_DIR} )
30 ELSE(ADNS_FOUND)
31   SET( ADNS_LIBRARIES )
32   SET( ADNS_INCLUDE_DIRS )
33 ENDIF(ADNS_FOUND)
34
35 MARK_AS_ADVANCED( ADNS_LIBRARIES ADNS_INCLUDE_DIRS )