Add ZM_PATH_RM and ZM_PATH_UNAME to config.
parent
91c44a4f9a
commit
cc773eae43
|
@ -88,6 +88,8 @@ mark_as_advanced(
|
|||
ZM_PATH_MAP
|
||||
ZM_PATH_ARP
|
||||
ZM_PATH_ARP_SCAN
|
||||
ZM_PATH_RM
|
||||
ZM_PATH_UNAME
|
||||
ZM_CONFIG_DIR
|
||||
ZM_CONFIG_SUBDIR
|
||||
ZM_DETECT_SYSTEMD
|
||||
|
@ -155,6 +157,10 @@ 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_PATH_RM "" CACHE PATH
|
||||
"Full path to compatible rm binary. Leave empty for automatic detection.")
|
||||
set(ZM_PATH_UNAME "" CACHE PATH
|
||||
"Full path to compatible uname 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
|
||||
|
@ -671,6 +677,30 @@ if(ZM_PATH_ARP_SCAN STREQUAL "")
|
|||
endif()
|
||||
endif()
|
||||
|
||||
# Find the path to an rm compatible executable
|
||||
if(ZM_PATH_RM STREQUAL "")
|
||||
find_program(RM_EXECUTABLE rm)
|
||||
if(RM_EXECUTABLE)
|
||||
set(ZM_PATH_RM "${RM_EXECUTABLE}")
|
||||
mark_as_advanced(RM_EXECUTABLE)
|
||||
endif()
|
||||
if(RM_EXECUTABLE-NOTFOUND)
|
||||
message(WARNING "Unable to find a compatible rm binary.")
|
||||
endif()
|
||||
endif()
|
||||
|
||||
# Find the path to a uname compatible executable
|
||||
if(ZM_PATH_UNAME STREQUAL "")
|
||||
find_program(UNAME_EXECUTABLE uname)
|
||||
if(UNAME_EXECUTABLE)
|
||||
set(ZM_PATH_UNAME "${UNAME_EXECUTABLE}")
|
||||
mark_as_advanced(UNAME_EXECUTABLE)
|
||||
endif()
|
||||
if(UNAME_EXECUTABLE-NOTFOUND)
|
||||
message(WARNING "Unable to find a compatible uname binary.")
|
||||
endif()
|
||||
endif()
|
||||
|
||||
# Some variables that zm expects
|
||||
set(ZM_PID "${ZM_RUNDIR}/zm.pid")
|
||||
set(ZM_CONFIG "${ZM_CONFIG_DIR}/zm.conf")
|
||||
|
|
|
@ -54,6 +54,14 @@ ZM_PATH_ARP="@ZM_PATH_ARP@"
|
|||
# ZoneMinder will find the arp-scan binary automatically on most systems
|
||||
ZM_PATH_ARP_SCAN="@ZM_PATH_ARP_SCAN@"
|
||||
|
||||
# Full path to optional rm binary or just rm to use PATH
|
||||
# ZoneMinder will find the rm binary automatically on most systems
|
||||
ZM_PATH_RM="@ZM_PATH_RM@"
|
||||
|
||||
# Full path to optional uname binary or just uname to use PATH
|
||||
# ZoneMinder will find the rm binary automatically on most systems
|
||||
ZM_PATH_UNAME="@ZM_PATH_UNAME@"
|
||||
|
||||
#Full path to shutdown binary
|
||||
ZM_PATH_SHUTDOWN="@ZM_PATH_SHUTDOWN@"
|
||||
|
||||
|
|
Loading…
Reference in New Issue