From: Guy Harris Date: Thu, 3 Mar 2022 00:32:15 +0000 (-0800) Subject: CMake: change most AIRPCAP to AirPcap. X-Git-Tag: libpcap-1.10.2~217 X-Git-Url: https://git.tcpdump.org/libpcap/commitdiff_plain/d5f15a19d16681797e0497b0ae06d5ff2648f59c?ds=inline CMake: change most AIRPCAP to AirPcap. This squelches a warning from CMake. Fixes issue #1093. (cherry picked from commit d7c7d92c0830d2bb45d87a46818815b7de639e08) --- diff --git a/CMakeLists.txt b/CMakeLists.txt index b7ad038f..7664bd7f 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -1812,7 +1812,7 @@ if(NOT DISABLE_SNF) endif() # Check for Riverbed AirPcap support. -if(NOT DISABLE_AIRPCAP) +if(NOT DISABLE_AirPcap) # # Try to find the AirPcap header file and library. # @@ -1821,14 +1821,14 @@ if(NOT DISABLE_AIRPCAP) # # Did we succeed? # - if(AIRPCAP_FOUND) + if(AirPcap_FOUND) # # Yes. # - include_directories(AFTER ${AIRPCAP_INCLUDE_DIRS}) + include_directories(AFTER ${AirPcap_INCLUDE_DIRS}) set(PROJECT_SOURCE_LIST_C ${PROJECT_SOURCE_LIST_C} pcap-airpcap.c) set(HAVE_AIRPCAP_API TRUE) - set(PCAP_LINK_LIBRARIES ${PCAP_LINK_LIBRARIES} ${AIRPCAP_LIBRARIES}) + set(PCAP_LINK_LIBRARIES ${PCAP_LINK_LIBRARIES} ${AirPcap_LIBRARIES}) endif() endif() diff --git a/cmake/Modules/FindAirPcap.cmake b/cmake/Modules/FindAirPcap.cmake index 8198f70f..56c71b7b 100644 --- a/cmake/Modules/FindAirPcap.cmake +++ b/cmake/Modules/FindAirPcap.cmake @@ -6,14 +6,14 @@ # # This module defines the following variables: # -# AIRPCAP_INCLUDE_DIR - absolute path to the directory containing airpcap.h. +# AirPcap_INCLUDE_DIR - absolute path to the directory containing airpcap.h. # -# AIRPCAP_LIBRARY - relative or absolute path to the AirPcap library to +# AirPcap_LIBRARY - relative or absolute path to the AirPcap library to # link with. An absolute path is will be used if the # AirPcap library is not located in the compiler's # default search path. -# AIRPCAP_FOUND - TRUE if the AirPcap library *and* header are found. +# AirPcap_FOUND - TRUE if the AirPcap library *and* header are found. # # Hints and Backward Compatibility # ================================ @@ -46,24 +46,24 @@ if(CMAKE_SIZEOF_VOID_P EQUAL 8) endif() # Find the header -find_path(AIRPCAP_INCLUDE_DIR airpcap.h +find_path(AirPcap_INCLUDE_DIR airpcap.h PATH_SUFFIXES include ) # Find the library -find_library(AIRPCAP_LIBRARY +find_library(AirPcap_LIBRARY NAMES airpcap ) -# Set AIRPCAP_FOUND to TRUE if AIRPCAP_INCLUDE_DIR and AIRPCAP_LIBRARY are TRUE. +# Set AirPcap_FOUND to TRUE if AirPcap_INCLUDE_DIR and AirPcap_LIBRARY are TRUE. include(FindPackageHandleStandardArgs) -find_package_handle_standard_args(AIRPCAP +find_package_handle_standard_args(AirPcap DEFAULT_MSG - AIRPCAP_INCLUDE_DIR - AIRPCAP_LIBRARY + AirPcap_INCLUDE_DIR + AirPcap_LIBRARY ) -mark_as_advanced(AIRPCAP_INCLUDE_DIR AIRPCAP_LIBRARY) +mark_as_advanced(AirPcap_INCLUDE_DIR AirPcap_LIBRARY) -set(AIRPCAP_INCLUDE_DIRS ${AIRPCAP_INCLUDE_DIR}) -set(AIRPCAP_LIBRARIES ${AIRPCAP_LIBRARY}) +set(AirPcap_INCLUDE_DIRS ${AirPcap_INCLUDE_DIR}) +set(AirPcap_LIBRARIES ${AirPcap_LIBRARY})