endif(IS_DIRECTORY ${CMAKE_HOME_DIRECTORY}/../../Common)
find_package(Packet)
- if(PACKET_FOUND)
+ if(Packet_FOUND)
set(HAVE_PACKET32 TRUE)
- include_directories(${PACKET_INCLUDE_DIRS})
+ include_directories(${Packet_INCLUDE_DIRS})
#
# Check whether we have the NPcap PacketIsLoopbackAdapter()
# function.
#
cmake_push_check_state()
- set(CMAKE_REQUIRED_LIBRARIES ${PACKET_LIBRARIES})
+ set(CMAKE_REQUIRED_LIBRARIES ${Packet_LIBRARIES})
check_function_exists(PacketIsLoopbackAdapter HAVE_PACKET_IS_LOOPBACK_ADAPTER)
check_function_exists(PacketGetTimestampModes HAVE_PACKET_GET_TIMESTAMP_MODES)
cmake_pop_check_state()
- endif(PACKET_FOUND)
+ endif(Packet_FOUND)
message(STATUS "checking for Npcap's version.h")
check_symbol_exists(WINPCAP_PRODUCT_NAME "${CMAKE_SOURCE_DIR}/../../version.h" HAVE_VERSION_H)
#
# Link with packet.dll before Winsock2.
#
- set(PCAP_LINK_LIBRARIES ${PACKET_LIBRARIES} ${PCAP_LINK_LIBRARIES})
+ set(PCAP_LINK_LIBRARIES ${Packet_LIBRARIES} ${PCAP_LINK_LIBRARIES})
elseif(PCAP_TYPE STREQUAL "null")
else()
message(FATAL_ERROR "${PCAP_TYPE} is not a valid pcap type")
#
# This module defines the following variables:
#
-# PACKET_INCLUDE_DIR - absolute path to the directory containing Packet32.h.
+# Packet_INCLUDE_DIR - absolute path to the directory containing Packet32.h.
#
-# PACKET_LIBRARY - relative or absolute path to the Packet library to
+# Packet_LIBRARY - relative or absolute path to the Packet library to
# link with. An absolute path is will be used if the
# Packet library is not located in the compiler's
# default search path.
-# PACKET_FOUND - TRUE if the Packet library *and* header are found.
+# Packet_FOUND - TRUE if the Packet library *and* header are found.
#
# Hints and Backward Compatibility
# ================================
endif()
# Find the header
-find_path(PACKET_INCLUDE_DIR Packet32.h
+find_path(Packet_INCLUDE_DIR Packet32.h
PATH_SUFFIXES include Include
)
# Find the library
-find_library(PACKET_LIBRARY
+find_library(Packet_LIBRARY
NAMES Packet packet
)
-# Set PACKET_FOUND to TRUE if PACKET_INCLUDE_DIR and PACKET_LIBRARY are TRUE.
+# Set Packet_FOUND to TRUE if Packet_INCLUDE_DIR and Packet_LIBRARY are TRUE.
include(FindPackageHandleStandardArgs)
-find_package_handle_standard_args(PACKET
+find_package_handle_standard_args(Packet
DEFAULT_MSG
- PACKET_INCLUDE_DIR
- PACKET_LIBRARY
+ Packet_INCLUDE_DIR
+ Packet_LIBRARY
)
-mark_as_advanced(PACKET_INCLUDE_DIR PACKET_LIBRARY)
+mark_as_advanced(Packet_INCLUDE_DIR Packet_LIBRARY)
-set(PACKET_INCLUDE_DIRS ${PACKET_INCLUDE_DIR})
-set(PACKET_LIBRARIES ${PACKET_LIBRARY})
+set(Packet_INCLUDE_DIRS ${Packet_INCLUDE_DIR})
+set(Packet_LIBRARIES ${Packet_LIBRARY})