diff options
author | Gerald Combs <gerald@wireshark.org> | 2015-01-12 14:44:42 -0800 |
---|---|---|
committer | Gerald Combs <gerald@wireshark.org> | 2015-01-13 19:25:10 +0000 |
commit | a988253fef15e6a0ddd05b0fb06e18ccde00082b (patch) | |
tree | 8f702426b7d49b13bb388b14869b36b96bf6a020 /cmake/modules/FindCARES.cmake | |
parent | 42e40404294837b60af756dfbe0e6bb55cebaa21 (diff) |
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/FindCARES.cmake')
-rw-r--r-- | cmake/modules/FindCARES.cmake | 19 |
1 files changed, 18 insertions, 1 deletions
diff --git a/cmake/modules/FindCARES.cmake b/cmake/modules/FindCARES.cmake index 1d90838f2a..11719a601a 100644 --- a/cmake/modules/FindCARES.cmake +++ b/cmake/modules/FindCARES.cmake @@ -5,6 +5,8 @@ # CARES_INCLUDE_DIRS - where to find cares.h, etc. # CARES_LIBRARIES - List of libraries when using cares. # CARES_FOUND - True if cares found. +# CARES_DLL_DIR - (Windows) Path to the c-ares DLL. +# CARES_DLL - (Windows) Name of the c-ares DLL. IF (CARES_INCLUDE_DIRS) @@ -20,7 +22,7 @@ FIND_PATH(CARES_INCLUDE_DIR ares.h HINTS "${CARES_HINTS}/include" ) SET(CARES_NAMES cares libcares-2) FIND_LIBRARY(CARES_LIBRARY NAMES ${CARES_NAMES} HINTS "${CARES_HINTS}/lib" ) -# handle the QUIETLY and REQUIRED arguments and set CARES_FOUND to TRUE if +# handle the QUIETLY and REQUIRED arguments and set CARES_FOUND to TRUE if # all listed variables are TRUE INCLUDE(FindPackageHandleStandardArgs) FIND_PACKAGE_HANDLE_STANDARD_ARGS(CARES DEFAULT_MSG CARES_LIBRARY CARES_INCLUDE_DIR) @@ -28,9 +30,24 @@ FIND_PACKAGE_HANDLE_STANDARD_ARGS(CARES DEFAULT_MSG CARES_LIBRARY CARES_INCLUDE_ IF(CARES_FOUND) SET( CARES_LIBRARIES ${CARES_LIBRARY} ) SET( CARES_INCLUDE_DIRS ${CARES_INCLUDE_DIR} ) + if (WIN32) + set ( CARES_DLL_DIR "${CARES_HINTS}/bin" + CACHE PATH "Path to C-Ares DLL" + ) + file( GLOB _cares_dll RELATIVE "${CARES_DLL_DIR}" + "${CARES_DLL_DIR}/libcares-*.dll" + ) + set ( CARES_DLL ${_cares_dll} + # We're storing filenames only. Should we use STRING instead? + CACHE FILEPATH "C-Ares DLL file name" + ) + mark_as_advanced( CARES_DLL_DIR CARES_DLL ) + endif() ELSE(CARES_FOUND) SET( CARES_LIBRARIES ) SET( CARES_INCLUDE_DIRS ) + SET( CARES_DLL_DIR ) + SET( CARES_DLL ) ENDIF(CARES_FOUND) MARK_AS_ADVANCED( CARES_LIBRARIES CARES_INCLUDE_DIRS ) |