summaryrefslogtreecommitdiff
path: root/cmake/modules/FindKERBEROS.cmake
diff options
context:
space:
mode:
authorGerald Combs <gerald@wireshark.org>2015-01-12 14:44:42 -0800
committerGerald Combs <gerald@wireshark.org>2015-01-13 19:25:10 +0000
commita988253fef15e6a0ddd05b0fb06e18ccde00082b (patch)
tree8f702426b7d49b13bb388b14869b36b96bf6a020 /cmake/modules/FindKERBEROS.cmake
parent42e40404294837b60af756dfbe0e6bb55cebaa21 (diff)
downloadwireshark-a988253fef15e6a0ddd05b0fb06e18ccde00082b.tar.gz
CMake: Copy libwireshark dependent DLLs to the target directory.
Add a "copy_cli_dlls" target which copies the DLLs required to run our command line programs to the run directory. Fix the spelling of "KERBEROS". Start filling in variables so that we can populate config.nsh. Change-Id: I9b3ed912dfbffecbf09f2893efa2c9d82e709521 Reviewed-on: https://code.wireshark.org/review/6513 Reviewed-by: Gerald Combs <gerald@wireshark.org>
Diffstat (limited to 'cmake/modules/FindKERBEROS.cmake')
-rw-r--r--cmake/modules/FindKERBEROS.cmake27
1 files changed, 23 insertions, 4 deletions
diff --git a/cmake/modules/FindKERBEROS.cmake b/cmake/modules/FindKERBEROS.cmake
index aec66afdb3..c8a2b6841f 100644
--- a/cmake/modules/FindKERBEROS.cmake
+++ b/cmake/modules/FindKERBEROS.cmake
@@ -5,6 +5,8 @@
# KERBEROS_INCLUDE_DIRS - where to find krb5.h, etc.
# KERBEROS_LIBRARIES - List of libraries when using krb5.
# KERBEROS_FOUND - True if krb5 found.
+# KERBEROS_DLL_DIR - (Windows) Path to the Kerberos DLLs.
+# KERBEROS_DLLS - (Windows) List of required Kerberos DLLs.
IF (KERBEROS_INCLUDE_DIRS)
@@ -13,7 +15,7 @@ IF (KERBEROS_INCLUDE_DIRS)
ENDIF (KERBEROS_INCLUDE_DIRS)
INCLUDE(FindWSWinLibs)
-FindWSWinLibs("kfw-.*" "KERBOROS_HINTS")
+FindWSWinLibs("kfw-.*" "KERBEROS_HINTS")
find_package(PkgConfig)
pkg_search_module(KERBEROS krb5)
@@ -21,17 +23,17 @@ pkg_search_module(KERBEROS krb5)
FIND_PATH(KERBEROS_INCLUDE_DIR krb5.h
HINTS
"${KERBEROS_INCLUDEDIR}"
- "${KERBOROS_HINTS}/include"
+ "${KERBEROS_HINTS}/include"
)
SET(KERBEROS_NAMES krb5 krb5_32 krb5_64)
FIND_LIBRARY(KERBEROS_LIBRARY NAMES ${KERBEROS_NAMES}
HINTS
"${KERBEROS_LIBDIR}"
- "${KERBOROS_HINTS}/lib"
+ "${KERBEROS_HINTS}/lib"
)
-# handle the QUIETLY and REQUIRED arguments and set KERBEROS_FOUND to TRUE if
+# 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)
@@ -45,9 +47,26 @@ FIND_PACKAGE_HANDLE_STANDARD_ARGS(KERBEROS DEFAULT_MSG KERBEROS_LIBRARY KERBEROS
IF(KERBEROS_FOUND)
SET( KERBEROS_LIBRARIES ${KERBEROS_LIBRARY} )
SET( KERBEROS_INCLUDE_DIRS ${KERBEROS_INCLUDE_DIR} )
+ if (WIN32)
+ set ( KERBEROS_DLL_DIR "${KERBEROS_HINTS}/bin"
+ CACHE PATH "Path to the Kerberos DLLs"
+ )
+ file( GLOB _kerberos_dlls RELATIVE "${KERBEROS_DLL_DIR}"
+ "${KERBEROS_DLL_DIR}/comerr??.dll"
+ "${KERBEROS_DLL_DIR}/krb5_??.dll"
+ "${KERBEROS_DLL_DIR}/k5sprt??.dll"
+ )
+ set ( KERBEROS_DLLS ${_kerberos_dlls}
+ # We're storing filenames only. Should we use STRING instead?
+ CACHE FILEPATH "Kerberos DLL list"
+ )
+ mark_as_advanced( KERBEROS_DLL_DIR KERBEROS_DLLS )
+ endif()
ELSE(KERBEROS_FOUND)
SET( KERBEROS_LIBRARIES )
SET( KERBEROS_INCLUDE_DIRS )
+ SET( KERBEROS_DLL_DIR )
+ SET( KERBEROS_DLLS )
ENDIF(KERBEROS_FOUND)
MARK_AS_ADVANCED( KERBEROS_LIBRARIES KERBEROS_INCLUDE_DIRS )