From d056f15e54590496c779ec56b49dfd12b62f68d5 Mon Sep 17 00:00:00 2001 From: Isaac Connor Date: Mon, 7 Feb 2022 12:32:16 -0500 Subject: [PATCH] Add arp-scan to executable for use in network probing for cameras. --- CMakeLists.txt | 15 +++++++++++++++ 1 file changed, 15 insertions(+) diff --git a/CMakeLists.txt b/CMakeLists.txt index 1a65f85eb..6337e50c2 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -83,6 +83,7 @@ mark_as_advanced( ZM_TARGET_DISTRO ZM_PATH_MAP ZM_PATH_ARP + ZM_PATH_ARP_SCAN ZM_CONFIG_DIR ZM_CONFIG_SUBDIR ZM_SYSTEMD @@ -145,6 +146,8 @@ set(ZM_PATH_MAP "/dev/shm" CACHE PATH "Location to save mapped memory files, default: /dev/shm") set(ZM_PATH_ARP "" CACHE PATH "Full path to compatible arp binary. Leave empty for automatic detection.") +set(ZM_PATH_ARP_SCAN "" CACHE PATH + "Full path to compatible scan_arp binary. Leave empty for automatic detection.") set(ZM_CONFIG_DIR "/${CMAKE_INSTALL_SYSCONFDIR}" CACHE PATH "Location of ZoneMinder configuration, default system config directory") set(ZM_CONFIG_SUBDIR "${ZM_CONFIG_DIR}/conf.d" CACHE PATH @@ -641,6 +644,18 @@ if(ZM_PATH_ARP STREQUAL "") endif() endif() +# Find the path to an arp-scan compatible executable +if(ZM_PATH_ARP_SCAN STREQUAL "") + find_program(ARP_SCAN_EXECUTABLE arp-scan) + if(ARP_SCAN_EXECUTABLE) + set(ZM_PATH_ARP_SCAN "${ARP_SCAN_EXECUTABLE}") + mark_as_advanced(ARP_SCAN_EXECUTABLE) + endif() + if(ARP_SCAN_EXECUTABLE-NOTFOUND) + message(WARNING "Unable to find a compatible arp-scan binary. Monitor probe will be less powerful.") + endif() +endif() + # Some variables that zm expects set(ZM_PID "${ZM_RUNDIR}/zm.pid") set(ZM_CONFIG "${ZM_CONFIG_DIR}/zm.conf")