2013-09-28 17:59:50 +08:00
|
|
|
# CMakeLists.txt for the ZoneMinder binaries
|
|
|
|
|
|
|
|
# Create files from the .in files
|
2013-11-01 00:10:00 +08:00
|
|
|
configure_file(zm_config.h.in "${CMAKE_CURRENT_BINARY_DIR}/zm_config.h" @ONLY)
|
2013-09-28 17:59:50 +08:00
|
|
|
|
|
|
|
# Group together all the source files that are used by all the binaries (zmc, zma, zmu, zms etc)
|
2018-12-06 02:18:21 +08:00
|
|
|
set(ZM_BIN_SRC_FILES zm_box.cpp zm_buffer.cpp zm_camera.cpp zm_comms.cpp zm_config.cpp zm_coord.cpp zm_curl_camera.cpp zm.cpp zm_db.cpp zm_logger.cpp zm_event.cpp zm_frame.cpp zm_eventstream.cpp zm_exception.cpp zm_file_camera.cpp zm_ffmpeg_input.cpp zm_ffmpeg_camera.cpp zm_group.cpp zm_image.cpp zm_jpeg.cpp zm_libvlc_camera.cpp zm_local_camera.cpp zm_monitor.cpp zm_monitorstream.cpp zm_ffmpeg.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 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
|
|
|
|
2019-05-02 01:15:07 +08:00
|
|
|
|
|
|
|
# includes and linkages to 3rd party libraries/src
|
|
|
|
set (ZM_BIN_THIRDPARTY_SRC_FILES ../third_party/sha1/sha1.cpp)
|
2019-05-02 02:22:10 +08:00
|
|
|
|
2019-05-02 01:15:07 +08:00
|
|
|
|
2013-09-28 17:59:50 +08:00
|
|
|
# A fix for cmake recompiling the source files for every target.
|
2019-05-02 01:28:39 +08:00
|
|
|
add_library(zm STATIC ${ZM_BIN_SRC_FILES} ${ZM_BIN_THIRDPARTY_SRC_FILES})
|
2019-05-02 02:30:00 +08:00
|
|
|
link_directories(/home/pp/source/pp_ZoneMinder.git/third_party/bcrypt)
|
2013-09-28 17:59:50 +08:00
|
|
|
|
|
|
|
add_executable(zmc zmc.cpp)
|
|
|
|
add_executable(zma zma.cpp)
|
|
|
|
add_executable(zmu zmu.cpp)
|
|
|
|
add_executable(zms zms.cpp)
|
|
|
|
|
2019-05-02 01:24:50 +08:00
|
|
|
include_directories(../third_party/sha1 ../third_party/bcrypt/include/bcrypt)
|
2019-05-02 01:15:07 +08:00
|
|
|
|
2019-05-02 01:46:54 +08:00
|
|
|
target_link_libraries(zmc zm ${ZM_EXTRA_LIBS} ${ZM_BIN_LIBS})
|
|
|
|
target_link_libraries(zma zm ${ZM_EXTRA_LIBS} ${ZM_BIN_LIBS})
|
2019-05-02 01:15:07 +08:00
|
|
|
target_link_libraries(zmu zm ${ZM_EXTRA_LIBS} ${ZM_BIN_LIBS} bcrypt)
|
|
|
|
target_link_libraries(zms zm ${ZM_EXTRA_LIBS} ${ZM_BIN_LIBS} bcrypt)
|
2013-09-28 17:59:50 +08:00
|
|
|
|
2015-06-21 06:33:13 +08:00
|
|
|
# Generate man files for the binaries destined for the bin folder
|
2017-01-17 01:56:09 +08:00
|
|
|
FOREACH(CBINARY zma zmc zmu)
|
2018-12-07 23:47:00 +08:00
|
|
|
POD2MAN(${CMAKE_CURRENT_SOURCE_DIR}/${CBINARY}.cpp zoneminder-${CBINARY} 8 ${ZM_MANPAGE_DEST_PREFIX})
|
2017-01-17 01:56:09 +08:00
|
|
|
ENDFOREACH(CBINARY zma zmc zmu)
|
2013-09-28 17:59:50 +08:00
|
|
|
|
2017-01-17 01:56:09 +08:00
|
|
|
install(TARGETS zmc zma 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
|
|
|
|