wireshark/cmake/modules/FindSMI.cmake
Jörg Mayer d456079b7e Beginnings of win cmake support (not yet working), created by Graham Bloice,
some smaller changes by me.
- README.cmake
  Document how to (one day) run on Windows
- CMakeLists.txt
  Use MSVC compiler flags for MSVC instead of gcc flags
- FindWSWinLibs.cmake
  New: Creates HINTS for finding includes and libraries
  inside the Wireshark support library installation.
- FindXXX.cmake
  Make use of HINTS generated by FindWSWinLibs.cmake

This has not really been tested on Windows as my installation seems to have
automagically downloaded some fixes and is in an inconsistent state since.
Will probably need to reinstall.

svn path=/trunk/; revision=52194
2013-09-23 21:45:55 +00:00

39 lines
1,006 B
CMake

#
# $Id$
#
# - Find smi
# Find the native SMI includes and library
#
# SMI_INCLUDE_DIRS - where to find smi.h, etc.
# SMI_LIBRARIES - List of libraries when using smi.
# SMI_FOUND - True if smi found.
IF (SMI_INCLUDE_DIR)
# Already in cache, be silent
SET(SMI_FIND_QUIETLY TRUE)
ENDIF (SMI_INCLUDE_DIR)
INCLUDE(FindWSWinLibs)
FindWSWinLibs("libsmi-.*" "SMI_HINTS")
FIND_PATH(SMI_INCLUDE_DIR smi.h HINTS "${SMI_HINTS}/include" )
SET(SMI_NAMES smi libsmi-2)
FIND_LIBRARY(SMI_LIBRARY NAMES ${SMI_NAMES} HINTS "${SMI_HINTS}/lib" )
# handle the QUIETLY and REQUIRED arguments and set SMI_FOUND to TRUE if
# all listed variables are TRUE
INCLUDE(FindPackageHandleStandardArgs)
FIND_PACKAGE_HANDLE_STANDARD_ARGS(SMI DEFAULT_MSG SMI_LIBRARY SMI_INCLUDE_DIR)
IF(SMI_FOUND)
SET( SMI_LIBRARIES ${SMI_LIBRARY} )
SET( SMI_INCLUDE_DIRS ${SMI_INCLUDE_DIR} )
ELSE(SMI_FOUND)
SET( SMI_LIBRARIES )
SET( SMI_INCLUDE_DIRS )
ENDIF(SMI_FOUND)
MARK_AS_ADVANCED( SMI_LIBRARIES SMI_INCLUDE_DIRS )