wireshark/cmake/modules/FindKERBEROS.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

45 lines
1.3 KiB
CMake

#
# $Id$
#
# - Find kerberos
# Find the native KERBEROS includes and library
#
# KERBEROS_INCLUDE_DIRS - where to find krb5.h, etc.
# KERBEROS_LIBRARIES - List of libraries when using krb5.
# KERBEROS_FOUND - True if krb5 found.
IF (KERBEROS_INCLUDE_DIRS)
# Already in cache, be silent
SET(KERBEROS_FIND_QUIETLY TRUE)
ENDIF (KERBEROS_INCLUDE_DIRS)
INCLUDE(FindWSWinLibs)
FindWSWinLibs("kfw-.*" "KERBOROS_HINTS")
FIND_PATH(KERBEROS_INCLUDE_DIR krb5.h HINTS "${KERBOROS_HINTS}/include" )
SET(KERBEROS_NAMES krb5 krb5_32)
FIND_LIBRARY(KERBEROS_LIBRARY NAMES ${KERBEROS_NAMES} HINTS "${KERBOROS_HINTS}/lib" )
# handle the QUIETLY and REQUIRED arguments and set KERBEROS_FOUND to TRUE if
# all listed variables are TRUE
INCLUDE(FindPackageHandleStandardArgs)
FIND_PACKAGE_HANDLE_STANDARD_ARGS(KERBEROS DEFAULT_MSG KERBEROS_LIBRARY KERBEROS_INCLUDE_DIR)
# todo
# add all kerberos libs
# autodetect HAVE_HEIMDAL_KERBEROS
# autodetect HAVE_MIT_KERBEROS
# autodetect(?) HAVE_KEYTYPE_ARCFOUR_56
IF(KERBEROS_FOUND)
SET( KERBEROS_LIBRARIES ${KERBEROS_LIBRARY} )
SET( KERBEROS_INCLUDE_DIRS ${KERBEROS_INCLUDE_DIR} )
ELSE(KERBEROS_FOUND)
SET( KERBEROS_LIBRARIES )
SET( KERBEROS_INCLUDE_DIRS )
ENDIF(KERBEROS_FOUND)
MARK_AS_ADVANCED( KERBEROS_LIBRARIES KERBEROS_INCLUDE_DIRS )