Build custom UDP IP packet source if PCAP is available

This commit is contained in:
Carles Fernandez 2019-06-24 21:40:25 +02:00
parent 16a98cc8c9
commit a4676a53e4
No known key found for this signature in database
GPG Key ID: 4C583C52B0C3877D
1 changed files with 4 additions and 2 deletions

View File

@ -2129,9 +2129,11 @@ set_package_properties(PCAP PROPERTIES
PURPOSE "Used for the custom UDP IP packet source."
TYPE OPTIONAL
)
if(PCAP_FOUND)
set(ENABLE_RAW_UDP ON)
endif()
if(ENABLE_RAW_UDP)
message(STATUS "High-optimized custom UDP IP packet source is enabled.")
message(STATUS "Highly-optimized custom UDP IP packet source is enabled.")
message(STATUS " You can disable it with 'cmake -DENABLE_RAW_UDP=OFF ..'")
if(NOT PCAP_FOUND)
message(FATAL_ERROR "PCAP required to compile custom UDP packet sample source (with ENABLE_RAW_UDP=ON)")