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