mirror of
https://github.com/pavel-odintsov/fastnetmon
synced 2024-11-23 13:22:36 +01:00
Moved pcap library search to happen before we use results from it
This commit is contained in:
parent
a4bc0cc402
commit
a6b2afa6ac
@ -459,6 +459,19 @@ if (ENABLE_LIBBPF_SUPPORT)
|
|||||||
|
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
|
### Look for libpcap
|
||||||
|
|
||||||
|
find_path(LIBPCAP_INCLUDES_FOLDER NAMES pcap.h PATHS "${LIBPCAP_CUSTOM_INSTALL_PATH}/include" ${DISABLE_DEFAULT_PATH_SEARCH_VAR})
|
||||||
|
|
||||||
|
find_library(LIBPCAP_LIBRARY_PATH NAMES pcap PATHS "${LIBPCAP_CUSTOM_INSTALL_PATH}/lib" ${DISABLE_DEFAULT_PATH_SEARCH_VAR})
|
||||||
|
|
||||||
|
if (LIBPCAP_INCLUDES_FOLDER AND LIBPCAP_LIBRARY_PATH)
|
||||||
|
message(STATUS "We found pcap library ${LIBPCAP_LIBRARY_PATH}")
|
||||||
|
|
||||||
|
include_directories(${LIBPCAP_INCLUDES_FOLDER})
|
||||||
|
else()
|
||||||
|
message(FATAL_ERROR "We can't find pcap library")
|
||||||
|
endif()
|
||||||
|
|
||||||
|
|
||||||
if (ENABLE_AF_XDP_SUPPORT)
|
if (ENABLE_AF_XDP_SUPPORT)
|
||||||
@ -872,20 +885,6 @@ if (ENABLE_MONGODB_SUPPORT)
|
|||||||
|
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
### Look for libpcap
|
|
||||||
|
|
||||||
find_path(LIBPCAP_INCLUDES_FOLDER NAMES pcap.h PATHS "${LIBPCAP_CUSTOM_INSTALL_PATH}/include" ${DISABLE_DEFAULT_PATH_SEARCH_VAR})
|
|
||||||
|
|
||||||
find_library(LIBPCAP_LIBRARY_PATH NAMES pcap PATHS "${LIBPCAP_CUSTOM_INSTALL_PATH}/lib" ${DISABLE_DEFAULT_PATH_SEARCH_VAR})
|
|
||||||
|
|
||||||
if (LIBPCAP_INCLUDES_FOLDER AND LIBPCAP_LIBRARY_PATH)
|
|
||||||
message(STATUS "We found pcap library ${LIBPCAP_LIBRARY_PATH}")
|
|
||||||
|
|
||||||
include_directories(${LIBPCAP_INCLUDES_FOLDER})
|
|
||||||
else()
|
|
||||||
message(FATAL_ERROR "We can't find pcap library")
|
|
||||||
endif()
|
|
||||||
|
|
||||||
### Look for log4cpp
|
### Look for log4cpp
|
||||||
|
|
||||||
# Try to find log4cpp includes path
|
# Try to find log4cpp includes path
|
||||||
|
Loading…
Reference in New Issue
Block a user