summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--cmake/modules/FindAIRPCAP.cmake5
-rw-r--r--cmake/modules/FindWSWinLibs.cmake18
2 files changed, 15 insertions, 8 deletions
diff --git a/cmake/modules/FindAIRPCAP.cmake b/cmake/modules/FindAIRPCAP.cmake
index cc157783a8..bbba66a444 100644
--- a/cmake/modules/FindAIRPCAP.cmake
+++ b/cmake/modules/FindAIRPCAP.cmake
@@ -9,7 +9,10 @@
# AIRPCAP_FOUND - True if pcap found.
include( FindWSWinLibs )
-FindWSWinLibs( "AirPcap.*/Airpcap.*" "AIRPCAP_HINTS" )
+FindWSWinLibs( "AirPcap" AIRPCAP_TMP_HINTS )
+#message( STATUS "AIRPCAP TMP HINTS: ${AIRPCAP_TMP_HINTS}" )
+FindWSWinLibs( "Airpcap_" AIRPCAP_HINTS "${AIRPCAP_TMP_HINTS}" )
+#message( STATUS "AIRPCAP HINTS: ${AIRPCAP_HINTS}" )
find_path( AIRPCAP_INCLUDE_DIR
NAMES
diff --git a/cmake/modules/FindWSWinLibs.cmake b/cmake/modules/FindWSWinLibs.cmake
index dfb8203092..16e30ee067 100644
--- a/cmake/modules/FindWSWinLibs.cmake
+++ b/cmake/modules/FindWSWinLibs.cmake
@@ -8,11 +8,15 @@
# The function is passed the directory name to search for and the variable
# to set in the callers scope.
-function(FindWSWinLibs _WS_LIB_SEARCH_PATH _LIB_HINT_VAR)
- if (WIN32)
- set( _WS_BASE_DIR $ENV{WIRESHARK_BASE_DIR} )
- set( _WS_TARGET_PLATFORM $ENV{WIRESHARK_TARGET_PLATFORM} )
- set( _PROJECT_LIB_DIR "${_WS_BASE_DIR}/wireshark-${_WS_TARGET_PLATFORM}-libs" )
+function( FindWSWinLibs _WS_LIB_SEARCH_PATH _LIB_HINT_VAR )
+ if( WIN32 )
+ if( ARGN )
+ set( _PROJECT_LIB_DIR ${ARGN} )
+ else()
+ set( _WS_BASE_DIR $ENV{WIRESHARK_BASE_DIR} )
+ set( _WS_TARGET_PLATFORM $ENV{WIRESHARK_TARGET_PLATFORM} )
+ set( _PROJECT_LIB_DIR "${_WS_BASE_DIR}/wireshark-${_WS_TARGET_PLATFORM}-libs" )
+ endif()
file( GLOB _SUBDIR "${_PROJECT_LIB_DIR}/*" )
foreach( _DIR ${_SUBDIR} )
if( IS_DIRECTORY ${_DIR} )
@@ -24,8 +28,8 @@ function(FindWSWinLibs _WS_LIB_SEARCH_PATH _LIB_HINT_VAR)
endif()
endfunction()
-function(WSExtendPath _LIB_PATH_LIST _PATH_FILE)
- if (WIN32)
+function( WSExtendPath _LIB_PATH_LIST _PATH_FILE )
+ if ( WIN32 )
#message( STATUS "All libs: ${_LIB_PATH_LIST}." )
foreach( THIS_LIB_PATH ${_LIB_PATH_LIST} )
get_filename_component( LIB_PATH ${THIS_LIB_PATH} PATH )