2013-09-28 17:59:50 +08:00
|
|
|
# CMakeLists.txt for the ZoneMinder perl scripts.
|
|
|
|
|
|
|
|
# Process the perl modules subdirectory
|
2013-11-01 00:10:00 +08:00
|
|
|
add_subdirectory(ZoneMinder)
|
2013-09-28 17:59:50 +08:00
|
|
|
|
|
|
|
# Create files from the .in files
|
2013-11-01 00:10:00 +08:00
|
|
|
configure_file(zmaudit.pl.in "${CMAKE_CURRENT_BINARY_DIR}/zmaudit.pl" @ONLY)
|
|
|
|
configure_file(zmcontrol.pl.in "${CMAKE_CURRENT_BINARY_DIR}/zmcontrol.pl" @ONLY)
|
|
|
|
configure_file(zmdc.pl.in "${CMAKE_CURRENT_BINARY_DIR}/zmdc.pl" @ONLY)
|
|
|
|
configure_file(zmfilter.pl.in "${CMAKE_CURRENT_BINARY_DIR}/zmfilter.pl" @ONLY)
|
2018-02-01 05:57:17 +08:00
|
|
|
configure_file(zmonvif-probe.pl.in "${CMAKE_CURRENT_BINARY_DIR}/zmonvif-probe.pl" @ONLY)
|
2020-05-10 05:35:27 +08:00
|
|
|
configure_file(zmonvif-trigger.pl.in "${CMAKE_CURRENT_BINARY_DIR}/zmonvif-trigger.pl" @ONLY)
|
2013-11-01 00:10:00 +08:00
|
|
|
configure_file(zmpkg.pl.in "${CMAKE_CURRENT_BINARY_DIR}/zmpkg.pl" @ONLY)
|
2018-11-06 05:52:34 +08:00
|
|
|
configure_file(zmrecover.pl.in "${CMAKE_CURRENT_BINARY_DIR}/zmrecover.pl" @ONLY)
|
2013-11-01 00:10:00 +08:00
|
|
|
configure_file(zmtrack.pl.in "${CMAKE_CURRENT_BINARY_DIR}/zmtrack.pl" @ONLY)
|
|
|
|
configure_file(zmtrigger.pl.in "${CMAKE_CURRENT_BINARY_DIR}/zmtrigger.pl" @ONLY)
|
|
|
|
configure_file(zmupdate.pl.in "${CMAKE_CURRENT_BINARY_DIR}/zmupdate.pl" @ONLY)
|
|
|
|
configure_file(zmvideo.pl.in "${CMAKE_CURRENT_BINARY_DIR}/zmvideo.pl" @ONLY)
|
|
|
|
configure_file(zmwatch.pl.in "${CMAKE_CURRENT_BINARY_DIR}/zmwatch.pl" @ONLY)
|
2018-01-11 01:56:36 +08:00
|
|
|
configure_file(zmstats.pl.in "${CMAKE_CURRENT_BINARY_DIR}/zmstats.pl" @ONLY)
|
2014-01-22 06:22:30 +08:00
|
|
|
configure_file(zmcamtool.pl.in "${CMAKE_CURRENT_BINARY_DIR}/zmcamtool.pl" @ONLY)
|
2014-08-20 06:19:44 +08:00
|
|
|
configure_file(zmsystemctl.pl.in "${CMAKE_CURRENT_BINARY_DIR}/zmsystemctl.pl" @ONLY)
|
2016-02-07 04:50:02 +08:00
|
|
|
configure_file(zmtelemetry.pl.in "${CMAKE_CURRENT_BINARY_DIR}/zmtelemetry.pl" @ONLY)
|
2013-10-19 22:22:59 +08:00
|
|
|
if(NOT ZM_NO_X10)
|
2013-11-01 00:10:00 +08:00
|
|
|
configure_file(zmx10.pl.in "${CMAKE_CURRENT_BINARY_DIR}/zmx10.pl" @ONLY)
|
2013-10-19 22:22:59 +08:00
|
|
|
endif()
|
2013-11-01 00:10:00 +08:00
|
|
|
#configure_file(zmdbbackup.in zmdbbackup @ONLY)
|
|
|
|
#configure_file(zmdbrestore.in zmdbrestore @ONLY)
|
|
|
|
configure_file(zm.in "${CMAKE_CURRENT_BINARY_DIR}/zm" @ONLY)
|
|
|
|
#configure_file(zmeventdump.in zmeventdump @ONLY)
|
2013-09-28 17:59:50 +08:00
|
|
|
|
2015-06-21 04:22:11 +08:00
|
|
|
# Generate man files for the perl scripts destined for the bin folder
|
2021-02-04 04:22:28 +08:00
|
|
|
if(BUILD_MAN)
|
|
|
|
file(GLOB perlscripts "${CMAKE_CURRENT_BINARY_DIR}/*.pl")
|
|
|
|
foreach(PERLSCRIPT ${perlscripts})
|
2017-03-22 04:46:10 +08:00
|
|
|
get_filename_component(PERLSCRIPTNAME ${PERLSCRIPT} NAME)
|
2020-08-06 05:56:30 +08:00
|
|
|
POD2MAN(${PERLSCRIPT} ${PERLSCRIPTNAME} 8 ${ZM_MANPAGE_DEST_PREFIX})
|
2021-02-04 04:22:28 +08:00
|
|
|
endforeach(PERLSCRIPT ${perlscripts})
|
|
|
|
endif()
|
2015-06-21 04:22:11 +08:00
|
|
|
|
2013-09-28 17:59:50 +08:00
|
|
|
# Install the perl scripts
|
2020-05-10 05:35:27 +08:00
|
|
|
install(FILES
|
|
|
|
"${CMAKE_CURRENT_BINARY_DIR}/zmaudit.pl"
|
|
|
|
"${CMAKE_CURRENT_BINARY_DIR}/zmcontrol.pl"
|
|
|
|
"${CMAKE_CURRENT_BINARY_DIR}/zmdc.pl"
|
|
|
|
"${CMAKE_CURRENT_BINARY_DIR}/zmfilter.pl"
|
|
|
|
"${CMAKE_CURRENT_BINARY_DIR}/zmonvif-probe.pl"
|
|
|
|
"${CMAKE_CURRENT_BINARY_DIR}/zmonvif-trigger.pl"
|
|
|
|
"${CMAKE_CURRENT_BINARY_DIR}/zmpkg.pl"
|
|
|
|
"${CMAKE_CURRENT_BINARY_DIR}/zmrecover.pl"
|
|
|
|
"${CMAKE_CURRENT_BINARY_DIR}/zmtrack.pl"
|
|
|
|
"${CMAKE_CURRENT_BINARY_DIR}/zmtrigger.pl"
|
|
|
|
"${CMAKE_CURRENT_BINARY_DIR}/zmupdate.pl"
|
|
|
|
"${CMAKE_CURRENT_BINARY_DIR}/zmvideo.pl"
|
|
|
|
"${CMAKE_CURRENT_BINARY_DIR}/zmwatch.pl"
|
|
|
|
"${CMAKE_CURRENT_BINARY_DIR}/zmcamtool.pl"
|
|
|
|
"${CMAKE_CURRENT_BINARY_DIR}/zmtelemetry.pl"
|
|
|
|
"${CMAKE_CURRENT_BINARY_DIR}/zmstats.pl"
|
|
|
|
DESTINATION "${CMAKE_INSTALL_FULL_BINDIR}" PERMISSIONS OWNER_WRITE OWNER_READ OWNER_EXECUTE GROUP_READ GROUP_EXECUTE WORLD_READ WORLD_EXECUTE)
|
2013-10-19 22:22:59 +08:00
|
|
|
if(NOT ZM_NO_X10)
|
2013-11-04 15:56:40 +08:00
|
|
|
install(FILES "${CMAKE_CURRENT_BINARY_DIR}/zmx10.pl" DESTINATION "${CMAKE_INSTALL_FULL_BINDIR}" PERMISSIONS OWNER_WRITE OWNER_READ OWNER_EXECUTE GROUP_READ GROUP_EXECUTE WORLD_READ WORLD_EXECUTE)
|
2013-10-19 22:22:59 +08:00
|
|
|
endif()
|
2014-08-14 08:02:59 +08:00
|
|
|
|
2017-06-22 22:14:24 +08:00
|
|
|
if(WITH_SYSTEMD)
|
|
|
|
install(FILES "${CMAKE_CURRENT_BINARY_DIR}/zmsystemctl.pl" DESTINATION "${CMAKE_INSTALL_FULL_BINDIR}" PERMISSIONS OWNER_WRITE OWNER_READ OWNER_EXECUTE GROUP_READ GROUP_EXECUTE WORLD_READ WORLD_EXECUTE)
|
|
|
|
endif()
|