2013-09-28 17:59:50 +08:00
|
|
|
# CMakeLists.txt for the ZoneMinder binaries
|
|
|
|
|
|
|
|
# Create files from the .in files
|
2020-08-26 03:52:49 +08:00
|
|
|
configure_file(zm_config_data.h.in "${CMAKE_CURRENT_BINARY_DIR}/zm_config_data.h" @ONLY)
|
2013-09-28 17:59:50 +08:00
|
|
|
|
2017-12-01 04:19:31 +08:00
|
|
|
# Group together all the source files that are used by all the binaries (zmc, zmu, zms etc)
|
2018-05-11 05:46:46 +08:00
|
|
|
set(ZM_BIN_SRC_FILES
|
|
|
|
zm_analysis_thread.cpp
|
2018-12-27 01:02:00 +08:00
|
|
|
zm_box.cpp
|
|
|
|
zm_buffer.cpp
|
|
|
|
zm_camera.cpp
|
|
|
|
zm_comms.cpp
|
|
|
|
zm_config.cpp
|
|
|
|
zm_coord.cpp
|
|
|
|
zm_curl_camera.cpp
|
2019-08-23 00:57:00 +08:00
|
|
|
zm_crypt.cpp
|
2018-12-27 01:02:00 +08:00
|
|
|
zm.cpp
|
|
|
|
zm_db.cpp
|
|
|
|
zm_logger.cpp
|
|
|
|
zm_event.cpp
|
|
|
|
zm_eventstream.cpp
|
|
|
|
zm_exception.cpp
|
2019-08-23 00:57:00 +08:00
|
|
|
zm_fifo.cpp
|
2020-12-08 05:26:26 +08:00
|
|
|
zm_file_camera.cpp
|
|
|
|
zm_font.cpp
|
2018-12-27 01:02:00 +08:00
|
|
|
zm_frame.cpp
|
|
|
|
zm_group.cpp
|
|
|
|
zm_image.cpp
|
|
|
|
zm_jpeg.cpp
|
|
|
|
zm_libvlc_camera.cpp
|
2020-07-22 05:38:32 +08:00
|
|
|
zm_libvnc_camera.cpp
|
2018-12-27 01:02:00 +08:00
|
|
|
zm_local_camera.cpp
|
|
|
|
zm_monitor.cpp
|
|
|
|
zm_monitorstream.cpp
|
|
|
|
zm_ffmpeg.cpp
|
2020-12-08 05:26:26 +08:00
|
|
|
zm_ffmpeg_camera.cpp
|
2018-12-27 01:02:00 +08:00
|
|
|
zm_ffmpeg_input.cpp
|
|
|
|
zm_mpeg.cpp
|
|
|
|
zm_packet.cpp
|
|
|
|
zm_packetqueue.cpp
|
|
|
|
zm_poly.cpp
|
|
|
|
zm_regexp.cpp
|
|
|
|
zm_remote_camera.cpp
|
|
|
|
zm_remote_camera_http.cpp
|
|
|
|
zm_remote_camera_nvsocket.cpp
|
|
|
|
zm_remote_camera_rtsp.cpp
|
|
|
|
zm_rtp.cpp
|
|
|
|
zm_rtp_ctrl.cpp
|
|
|
|
zm_rtp_data.cpp
|
|
|
|
zm_rtp_source.cpp
|
|
|
|
zm_rtsp.cpp
|
|
|
|
zm_rtsp_auth.cpp
|
2021-02-28 01:26:37 +08:00
|
|
|
zm_rtsp_server.cpp
|
2020-12-10 01:20:01 +08:00
|
|
|
zm_rtsp_server_thread.cpp
|
2021-01-23 08:23:36 +08:00
|
|
|
zm_rtsp_server_adts_source.cpp
|
2021-02-28 01:26:37 +08:00
|
|
|
zm_rtsp_server_adts_fifo_source.cpp
|
2021-01-06 23:48:52 +08:00
|
|
|
zm_rtsp_server_h264_device_source.cpp
|
2021-02-28 01:26:37 +08:00
|
|
|
zm_rtsp_server_h264_fifo_source.cpp
|
2021-01-06 23:48:52 +08:00
|
|
|
zm_rtsp_server_device_source.cpp
|
2021-02-28 01:26:37 +08:00
|
|
|
zm_rtsp_server_fifo_source.cpp
|
|
|
|
zm_rtsp_server_fifo_video_source.cpp
|
2021-01-06 23:48:52 +08:00
|
|
|
zm_rtsp_server_server_media_subsession.cpp
|
|
|
|
zm_rtsp_server_unicast_server_media_subsession.cpp
|
2018-12-27 01:02:00 +08:00
|
|
|
zm_sdp.cpp
|
|
|
|
zm_signal.cpp
|
|
|
|
zm_stream.cpp
|
|
|
|
zm_swscale.cpp
|
|
|
|
zm_thread.cpp
|
|
|
|
zm_time.cpp
|
|
|
|
zm_timer.cpp
|
|
|
|
zm_user.cpp
|
|
|
|
zm_utils.cpp
|
|
|
|
zm_video.cpp
|
|
|
|
zm_videostore.cpp
|
|
|
|
zm_zone.cpp
|
|
|
|
zm_storage.cpp)
|
2013-09-28 17:59:50 +08:00
|
|
|
|
|
|
|
# A fix for cmake recompiling the source files for every target.
|
|
|
|
add_library(zm STATIC ${ZM_BIN_SRC_FILES})
|
2021-02-03 05:57:50 +08:00
|
|
|
|
|
|
|
target_include_directories(zm
|
|
|
|
PUBLIC
|
|
|
|
${CMAKE_CURRENT_SOURCE_DIR})
|
|
|
|
|
2021-02-09 05:36:34 +08:00
|
|
|
target_link_libraries(zm
|
2021-02-28 01:18:35 +08:00
|
|
|
PUBLIC
|
2021-02-28 02:06:08 +08:00
|
|
|
libbcrypt::bcrypt
|
2021-02-28 01:18:35 +08:00
|
|
|
jwt-cpp::jwt-cpp
|
2021-02-09 05:36:34 +08:00
|
|
|
PRIVATE
|
|
|
|
zm-core-interface)
|
|
|
|
|
2013-09-28 17:59:50 +08:00
|
|
|
add_executable(zmc zmc.cpp)
|
2021-02-28 01:26:37 +08:00
|
|
|
add_executable(zm_rtsp_server zm_rtsp_server.cpp)
|
2013-09-28 17:59:50 +08:00
|
|
|
add_executable(zms zms.cpp)
|
2021-02-28 01:26:37 +08:00
|
|
|
add_executable(zmu zmu.cpp)
|
2013-09-28 17:59:50 +08:00
|
|
|
|
2021-02-09 05:36:34 +08:00
|
|
|
target_link_libraries(zmc
|
|
|
|
PRIVATE
|
|
|
|
zm-core-interface
|
|
|
|
zm
|
|
|
|
${ZM_EXTRA_LIBS}
|
|
|
|
${ZM_BIN_LIBS}
|
|
|
|
${CMAKE_DL_LIBS})
|
|
|
|
|
2021-02-28 01:26:37 +08:00
|
|
|
target_link_libraries(zm_rtsp_server
|
2021-02-09 05:36:34 +08:00
|
|
|
PRIVATE
|
|
|
|
zm-core-interface
|
|
|
|
zm
|
|
|
|
${ZM_EXTRA_LIBS}
|
|
|
|
${ZM_BIN_LIBS}
|
2021-02-28 02:06:08 +08:00
|
|
|
${CMAKE_DL_LIBS})
|
2021-02-09 05:36:34 +08:00
|
|
|
|
|
|
|
target_link_libraries(zms
|
|
|
|
PRIVATE
|
|
|
|
zm-core-interface
|
|
|
|
zm
|
|
|
|
${ZM_EXTRA_LIBS}
|
|
|
|
${ZM_BIN_LIBS}
|
2021-02-28 02:06:08 +08:00
|
|
|
${CMAKE_DL_LIBS})
|
2013-09-28 17:59:50 +08:00
|
|
|
|
2021-02-28 01:26:37 +08:00
|
|
|
target_link_libraries(zmu
|
|
|
|
PRIVATE
|
|
|
|
zm-core-interface
|
|
|
|
zm
|
|
|
|
${ZM_EXTRA_LIBS}
|
|
|
|
${ZM_BIN_LIBS}
|
|
|
|
${CMAKE_DL_LIBS}
|
|
|
|
bcrypt)
|
|
|
|
|
2015-06-21 06:33:13 +08:00
|
|
|
# Generate man files for the binaries destined for the bin folder
|
2021-02-04 04:22:28 +08:00
|
|
|
if(BUILD_MAN)
|
|
|
|
foreach(CBINARY zmc zmu)
|
2020-08-07 13:54:58 +08:00
|
|
|
POD2MAN(${CMAKE_CURRENT_SOURCE_DIR}/${CBINARY}.cpp ${CBINARY} 8 ${ZM_MANPAGE_DEST_PREFIX})
|
2021-02-04 04:22:28 +08:00
|
|
|
endforeach(CBINARY zmc zmu)
|
|
|
|
endif()
|
2013-09-28 17:59:50 +08:00
|
|
|
|
2021-02-28 01:26:37 +08:00
|
|
|
install(TARGETS zmc zm_rtsp_server zmu RUNTIME DESTINATION "${CMAKE_INSTALL_FULL_BINDIR}" PERMISSIONS OWNER_WRITE OWNER_READ OWNER_EXECUTE GROUP_READ GROUP_EXECUTE WORLD_READ WORLD_EXECUTE)
|
2015-04-13 00:47:28 +08:00
|
|
|
install(TARGETS zms RUNTIME DESTINATION "${ZM_CGIDIR}" PERMISSIONS OWNER_WRITE OWNER_READ OWNER_EXECUTE GROUP_READ GROUP_EXECUTE WORLD_READ WORLD_EXECUTE)
|
2015-10-25 08:07:42 +08:00
|
|
|
install(CODE "execute_process(COMMAND ln -sf zms nph-zms WORKING_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR})")
|
|
|
|
install(FILES ${CMAKE_CURRENT_BINARY_DIR}/nph-zms DESTINATION "${ZM_CGIDIR}")
|
2013-09-28 17:59:50 +08:00
|
|
|
|