]> git.proxmox.com Git - ceph.git/blob - ceph/src/jaegertracing/opentelemetry-cpp/tools/vcpkg/ports/libpcap/add-disable-packet-option.patch
842176a559720f12910f4b28b5f225a4a6a87802
[ceph.git] / ceph / src / jaegertracing / opentelemetry-cpp / tools / vcpkg / ports / libpcap / add-disable-packet-option.patch
1 diff --git a/CMakeLists.txt b/CMakeLists.txt
2 index 3fe9979..23783d3 100644
3 --- a/CMakeLists.txt
4 +++ b/CMakeLists.txt
5 @@ -161,6 +161,7 @@ set(SEPTEL_ROOT "${CMAKE_CURRENT_SOURCE_DIR}/../septel" CACHE PATH "Path to dire
6 option(DISABLE_SNF "Disable Myricom SNF support" OFF)
7
8 option(DISABLE_TC "Disable Riverbed TurboCap support" OFF)
9 +option(DISABLE_PACKET "Disable Packet support" OFF)
10
11 #
12 # Debugging options.
13 @@ -220,19 +221,21 @@ if(WIN32)
14 include_directories(${CMAKE_HOME_DIRECTORY}/../../Common)
15 endif(IS_DIRECTORY ${CMAKE_HOME_DIRECTORY}/../../Common)
16
17 - find_package(Packet)
18 - if(PACKET_FOUND)
19 - set(HAVE_PACKET32 TRUE)
20 - include_directories(${PACKET_INCLUDE_DIRS})
21 - #
22 - # Check whether we have the NPcap PacketIsLoopbackAdapter()
23 - # function.
24 - #
25 - cmake_push_check_state()
26 - set(CMAKE_REQUIRED_LIBRARIES ${PACKET_LIBRARIES})
27 - check_function_exists(PacketIsLoopbackAdapter HAVE_PACKET_IS_LOOPBACK_ADAPTER)
28 - cmake_pop_check_state()
29 - endif(PACKET_FOUND)
30 + if(NOT DISABLE_PACKET)
31 + find_package(Packet)
32 + if(PACKET_FOUND)
33 + set(HAVE_PACKET32 TRUE)
34 + include_directories(${PACKET_INCLUDE_DIRS})
35 + #
36 + # Check whether we have the NPcap PacketIsLoopbackAdapter()
37 + # function.
38 + #
39 + cmake_push_check_state()
40 + set(CMAKE_REQUIRED_LIBRARIES ${PACKET_LIBRARIES})
41 + check_function_exists(PacketIsLoopbackAdapter HAVE_PACKET_IS_LOOPBACK_ADAPTER)
42 + cmake_pop_check_state()
43 + endif(PACKET_FOUND)
44 + endif()
45
46 message(STATUS "checking for Npcap's version.h")
47 check_symbol_exists(WINPCAP_PRODUCT_NAME "../../version.h" HAVE_VERSION_H)