Add cmake support
This commit is contained in:
parent
905237d7a6
commit
3f20a08d16
|
@ -56,7 +56,12 @@ mark_as_advanced(
|
|||
ZM_PERL_MM_PARMS
|
||||
ZM_PERL_SEARCH_PATH
|
||||
ZM_TARGET_DISTRO
|
||||
ZM_CONFIG_DIR)
|
||||
ZM_CONFIG_DIR
|
||||
ZM_PLUGIN_SUPPORT
|
||||
ZM_PLUGINSLIBDIR
|
||||
ZM_PLUGINSPKGLIBDIR
|
||||
ZM_PLUGINSCONFDIR
|
||||
ZM_PLUGINSWEBDIR)
|
||||
|
||||
set(ZM_RUNDIR "/var/run/zm" CACHE PATH
|
||||
"Location of transient process files, default: /var/run/zm")
|
||||
|
@ -119,6 +124,25 @@ set(ZM_PERL_SEARCH_PATH "" CACHE PATH
|
|||
installed outside Perl's default search path.")
|
||||
set(ZM_TARGET_DISTRO "" CACHE STRING
|
||||
"Build ZoneMinder for a specific distribution. Currently, valid names are: f21, f20, el6, OS13")
|
||||
set(ZM_PLUGIN_SUPPORT "OFF" CACHE BOOL
|
||||
"Set to ON to enable plugins support. This is EXPERIMENTAL. default: OFF")
|
||||
if(ZM_PLUGIN_SUPPORT)
|
||||
set(ZM_PREFIX ${CMAKE_INSTALL_PREFIX})
|
||||
set(ZM_PLUGINSLIBDIR "\${prefix}/${CMAKE_INSTALL_LIBDIR}" CACHE PATH
|
||||
"Location of the plugin files, default: ${CMAKE_INSTALL_LIBDIR}")
|
||||
set(ZM_PLUGINSPKGLIBDIR "${CMAKE_INSTALL_PREFIX}/${CMAKE_INSTALL_LIBEXECDIR}/zoneminder/plugins" CACHE PATH
|
||||
"Location of the plugin files, default: <prefix>/${CMAKE_INSTALL_LIBEXECDIR}/zoneminder/plugins")
|
||||
set(ZM_PLUGINSCONFDIR "/${CMAKE_INSTALL_SYSCONFDIR}/plugins.d" CACHE PATH
|
||||
"Location of the plugin files, default: /${CMAKE_INSTALL_SYSCONFDIR}/plugins.d")
|
||||
set(ZM_PLUGINSWEBDIR "${CMAKE_INSTALL_PREFIX}/${CMAKE_INSTALL_DATADIR}/zoneminder/plugins" CACHE PATH
|
||||
"Location of the plugin files, default: <prefix>/${CMAKE_INSTALL_DATADIR}/zoneminder/plugins")
|
||||
set(ZM_PROJECTNAME ${CMAKE_PROJECT_NAME})
|
||||
set(ZM_VERSION ${zoneminder_VERSION})
|
||||
set(ZM_PLUGINSEXT ".so" CACHE STRING
|
||||
"Plugin extension, default: .so")
|
||||
add_definitions(-DDEFAULT_PLUGIN_EXT=\"${ZM_PLUGIN_EXT}\")
|
||||
add_definitions(-DZM_PLUGINS_ON=1)
|
||||
endif(ZM_PLUGIN_SUPPORT)
|
||||
|
||||
# Reassign some variables if a target distro has been specified
|
||||
if((ZM_TARGET_DISTRO STREQUAL "f21") OR (ZM_TARGET_DISTRO STREQUAL "f20"))
|
||||
|
@ -207,6 +231,7 @@ find_package(ZLIB)
|
|||
if(ZLIB_FOUND)
|
||||
set(HAVE_LIBZLIB 1)
|
||||
list(APPEND ZM_BIN_LIBS "${ZLIB_LIBRARIES}")
|
||||
set(LIBS "${LIBS} -lz")
|
||||
include_directories("${ZLIB_INCLUDE_DIR}")
|
||||
set(CMAKE_REQUIRED_INCLUDES "${ZLIB_INCLUDE_DIR}")
|
||||
check_include_file("zlib.h" HAVE_ZLIB_H)
|
||||
|
@ -222,6 +247,7 @@ if(NOT ZM_NO_CURL)
|
|||
if(CURL_FOUND)
|
||||
set(HAVE_LIBCURL 1)
|
||||
list(APPEND ZM_BIN_LIBS ${CURL_LIBRARIES})
|
||||
set(LIBS "${LIBS} -lcurl")
|
||||
include_directories(${CURL_INCLUDE_DIRS})
|
||||
set(CMAKE_REQUIRED_INCLUDES ${CURL_INCLUDE_DIRS})
|
||||
check_include_file("curl/curl.h" HAVE_CURL_CURL_H)
|
||||
|
@ -236,6 +262,7 @@ find_package(JPEG)
|
|||
if(JPEG_FOUND)
|
||||
set(HAVE_LIBJPEG 1)
|
||||
list(APPEND ZM_BIN_LIBS "${JPEG_LIBRARIES}")
|
||||
set(LIBS "${LIBS} -ljpeg")
|
||||
#link_directories(${JPEG_LIBRARY})
|
||||
include_directories("${JPEG_INCLUDE_DIR}")
|
||||
set(CMAKE_REQUIRED_INCLUDES "${JPEG_INCLUDE_DIR}")
|
||||
|
@ -255,6 +282,7 @@ if(OPENSSL_FOUND)
|
|||
set(HAVE_LIBOPENSSL 1)
|
||||
set(HAVE_LIBCRYPTO 1)
|
||||
list(APPEND ZM_BIN_LIBS "${OPENSSL_LIBRARIES}")
|
||||
set(LIBS "${LIBS} -lssl -lcrypto")
|
||||
include_directories("${OPENSSL_INCLUDE_DIR}")
|
||||
set(CMAKE_REQUIRED_INCLUDES "${OPENSSL_INCLUDE_DIR}")
|
||||
check_include_file("openssl/md5.h" HAVE_OPENSSL_MD5_H)
|
||||
|
@ -268,6 +296,7 @@ find_library(PTHREAD_LIBRARIES pthread)
|
|||
if(PTHREAD_LIBRARIES)
|
||||
set(HAVE_LIBPTHREAD 1)
|
||||
list(APPEND ZM_BIN_LIBS "${PTHREAD_LIBRARIES}")
|
||||
set(LIBS "${LIBS} -lpthread")
|
||||
find_path(PTHREAD_INCLUDE_DIR pthread.h)
|
||||
if(PTHREAD_INCLUDE_DIR)
|
||||
include_directories("${PTHREAD_INCLUDE_DIR}")
|
||||
|
@ -289,6 +318,7 @@ find_library(PCRE_LIBRARIES pcre)
|
|||
if(PCRE_LIBRARIES)
|
||||
set(HAVE_LIBPCRE 1)
|
||||
list(APPEND ZM_BIN_LIBS "${PCRE_LIBRARIES}")
|
||||
set(LIBS "${LIBS} -lpcre")
|
||||
find_path(PCRE_INCLUDE_DIR pcre.h)
|
||||
if(PCRE_INCLUDE_DIR)
|
||||
include_directories("${PCRE_INCLUDE_DIR}")
|
||||
|
@ -306,6 +336,7 @@ find_library(GCRYPT_LIBRARIES gcrypt)
|
|||
if(GCRYPT_LIBRARIES)
|
||||
set(HAVE_LIBGCRYPT 1)
|
||||
list(APPEND ZM_BIN_LIBS "${GCRYPT_LIBRARIES}")
|
||||
set(LIBS "${LIBS} -lgcrypt")
|
||||
find_path(GCRYPT_INCLUDE_DIR gcrypt.h)
|
||||
if(GCRYPT_INCLUDE_DIR)
|
||||
include_directories("${GCRYPT_INCLUDE_DIR}")
|
||||
|
@ -327,6 +358,7 @@ endif(NOT GNUTLS_LIBRARIES)
|
|||
if(GNUTLS_LIBRARIES)
|
||||
set(HAVE_LIBGNUTLS 1)
|
||||
list(APPEND ZM_BIN_LIBS "${GNUTLS_LIBRARIES}")
|
||||
set(LIBS "${LIBS} -lgnutls-openssl")
|
||||
find_path(GNUTLS_INCLUDE_DIR gnutls/gnutls.h)
|
||||
if(GNUTLS_INCLUDE_DIR)
|
||||
include_directories("${GNUTLS_INCLUDE_DIR}")
|
||||
|
@ -345,6 +377,7 @@ find_library(MYSQLCLIENT_LIBRARIES mysqlclient PATH_SUFFIXES mysql)
|
|||
if(MYSQLCLIENT_LIBRARIES)
|
||||
set(HAVE_LIBMYSQLCLIENT 1)
|
||||
list(APPEND ZM_BIN_LIBS "${MYSQLCLIENT_LIBRARIES}")
|
||||
set(LIBS "${LIBS} -lmysqlclient")
|
||||
find_path(MYSQLCLIENT_INCLUDE_DIR mysql/mysql.h)
|
||||
if(MYSQLCLIENT_INCLUDE_DIR)
|
||||
include_directories("${MYSQLCLIENT_INCLUDE_DIR}")
|
||||
|
@ -370,6 +403,7 @@ if(NOT ZM_NO_FFMPEG)
|
|||
if(AVFORMAT_LIBRARIES)
|
||||
set(HAVE_LIBAVFORMAT 1)
|
||||
list(APPEND ZM_BIN_LIBS "${AVFORMAT_LIBRARIES}")
|
||||
set(LIBS "${LIBS} -lavformat")
|
||||
find_path(AVFORMAT_INCLUDE_DIR "libavformat/avformat.h")
|
||||
if(AVFORMAT_INCLUDE_DIR)
|
||||
include_directories("${AVFORMAT_INCLUDE_DIR}")
|
||||
|
@ -387,6 +421,7 @@ if(NOT ZM_NO_FFMPEG)
|
|||
if(AVCODEC_LIBRARIES)
|
||||
set(HAVE_LIBAVCODEC 1)
|
||||
list(APPEND ZM_BIN_LIBS "${AVCODEC_LIBRARIES}")
|
||||
set(LIBS "${LIBS} -lavcodec")
|
||||
find_path(AVCODEC_INCLUDE_DIR "libavcodec/avcodec.h")
|
||||
if(AVCODEC_INCLUDE_DIR)
|
||||
include_directories("${AVCODEC_INCLUDE_DIR}")
|
||||
|
@ -404,6 +439,7 @@ if(NOT ZM_NO_FFMPEG)
|
|||
if(AVDEVICE_LIBRARIES)
|
||||
set(HAVE_LIBAVDEVICE 1)
|
||||
list(APPEND ZM_BIN_LIBS "${AVDEVICE_LIBRARIES}")
|
||||
set(LIBS "${LIBS} -lavdevice")
|
||||
find_path(AVDEVICE_INCLUDE_DIR "libavdevice/avdevice.h")
|
||||
if(AVDEVICE_INCLUDE_DIR)
|
||||
include_directories("${AVDEVICE_INCLUDE_DIR}")
|
||||
|
@ -421,6 +457,7 @@ if(NOT ZM_NO_FFMPEG)
|
|||
if(AVUTIL_LIBRARIES)
|
||||
set(HAVE_LIBAVUTIL 1)
|
||||
list(APPEND ZM_BIN_LIBS "${AVUTIL_LIBRARIES}")
|
||||
set(LIBS "${LIBS} -lavutil")
|
||||
find_path(AVUTIL_INCLUDE_DIR "libavutil/avutil.h")
|
||||
if(AVUTIL_INCLUDE_DIR)
|
||||
include_directories("${AVUTIL_INCLUDE_DIR}")
|
||||
|
@ -439,6 +476,7 @@ if(NOT ZM_NO_FFMPEG)
|
|||
if(SWSCALE_LIBRARIES)
|
||||
set(HAVE_LIBSWSCALE 1)
|
||||
list(APPEND ZM_BIN_LIBS "${SWSCALE_LIBRARIES}")
|
||||
set(LIBS "${LIBS} -lswscale")
|
||||
find_path(SWSCALE_INCLUDE_DIR "libswscale/swscale.h")
|
||||
if(SWSCALE_INCLUDE_DIR)
|
||||
include_directories("${SWSCALE_INCLUDE_DIR}")
|
||||
|
@ -468,6 +506,7 @@ if(NOT ZM_NO_LIBVLC)
|
|||
if(LIBVLC_LIBRARIES)
|
||||
set(HAVE_LIBVLC 1)
|
||||
list(APPEND ZM_BIN_LIBS "${LIBVLC_LIBRARIES}")
|
||||
set(LIBS "${LIBS} -lvlc")
|
||||
find_path(LIBVLC_INCLUDE_DIR "vlc/vlc.h")
|
||||
if(LIBVLC_INCLUDE_DIR)
|
||||
include_directories("${LIBVLC_INCLUDE_DIR}")
|
||||
|
|
30
configure.ac
30
configure.ac
|
@ -229,33 +229,41 @@ if test "$ENABLE_PLUGIN_SUPPORT" == "yes"; then
|
|||
If you really want plugin support you must not call configure with
|
||||
--enable-shared=no or --disabled-shared])
|
||||
fi
|
||||
ZM_PREFIX="${prefix}"
|
||||
AC_SUBST(ZM_PREFIX)
|
||||
ZM_PLUGINSLIBDIR="${libdir}"
|
||||
AC_SUBST(ZM_PLUGINSLIBDIR)
|
||||
AC_ARG_WITH(pluginsdir,
|
||||
[ --with-pluginsdir=<path> plugins directory (requires --enable-plugin-support=yes)],
|
||||
[PLUGINSLIBDIR=$with_pluginsdir],
|
||||
[ZM_PLUGINSPKGLIBDIR=$with_pluginsdir],
|
||||
AC_MSG_ERROR([Plugin support is enabled.
|
||||
You must call configure with the --with-pluginsdir options.
|
||||
This tells configure where to install plugin library files.
|
||||
e.g. --with-pluginsdir=/usr/lib/zoneminder/plugins])
|
||||
)
|
||||
AC_SUBST(PLUGINSLIBDIR)
|
||||
PLUGINSCONFDIR="${sysconfdir}/plugins.d"
|
||||
AC_SUBST(ZM_PLUGINSPKGLIBDIR)
|
||||
ZM_PLUGINSCONFDIR="${sysconfdir}/plugins.d"
|
||||
AC_ARG_WITH(pluginsconfdir,
|
||||
[ --with-pluginsconfdir=<path> directory of plugin configuration files (requires --enable-plugin-support=yes)],
|
||||
[PLUGINSCONFDIR=$with_pluginsconfdir],
|
||||
[ZM_PLUGINSCONFDIR=$with_pluginsconfdir],
|
||||
AC_MSG_WARN([You can call configure with the --with-pluginsconfdir options.
|
||||
This tells configure where to install the plugin configuration files.
|
||||
The default is "${PLUGINSCONFDIR}".
|
||||
e.g. --with-pluginsconfdir=/etc/zm/plugins.d])
|
||||
)
|
||||
AC_SUBST(PLUGINSCONFDIR)
|
||||
PLUGINSWEBDIR="$WEB_PREFIX/plugins"
|
||||
AC_SUBST(PLUGINSWEBDIR)
|
||||
AC_SUBST(ZM_PLUGINSCONFDIR)
|
||||
ZM_PLUGINSWEBDIR="$WEB_PREFIX/plugins"
|
||||
AC_SUBST(ZM_PLUGINSWEBDIR)
|
||||
ZM_PROJECTNAME="${PACKAGE}"
|
||||
AC_SUBST(ZM_PROJECTNAME)
|
||||
ZM_VERSION="${PACKAGE_VERSION}"
|
||||
AC_SUBST(ZM_VERSION)
|
||||
ZM_PLUGINSEXT=".so"
|
||||
AC_SUBST(ZM_PLUGINSEXT)
|
||||
AC_DEFINE_UNQUOTED(DEFAULT_PLUGIN_EXT,"${ZM_PLUGINSEXT}",[File extension to detect plugins])
|
||||
AC_DEFINE(ZM_PLUGINS_ON,1,"Whether plugin support is switched on and compiled")
|
||||
PLUGINSEXT=".so"
|
||||
AC_SUBST(PLUGINSEXT)
|
||||
AC_DEFINE_UNQUOTED(DEFAULT_PLUGIN_EXT,"${PLUGINSEXT}",[File extension to detect plugins])
|
||||
fi
|
||||
AM_CONDITIONAL([ZM_HAS_PLUGIN_SUPPORT], [test "x$ENABLE_PLUGIN_SUPPORT" = xyes])
|
||||
AM_CONDITIONAL([ZM_PLUGIN_SUPPORT], [test "x$ENABLE_PLUGIN_SUPPORT" = xyes])
|
||||
|
||||
WEB_USER=apache
|
||||
AC_ARG_WITH(webuser,
|
||||
|
|
|
@ -2,12 +2,12 @@ Source: zoneminder
|
|||
Section: net
|
||||
Priority: optional
|
||||
Maintainer: Isaac Connor <iconnor@connortechnology.com>
|
||||
Build-Depends: debhelper (>= 9), cmake, libphp-serialization-perl, libgnutls-dev, libmysqlclient-dev | libmariadbclient-dev, libdbd-mysql-perl, libdate-manip-perl, libwww-perl, libjpeg8-dev, libpcre3-dev, libavcodec-dev, libavformat-dev (>= 3:0.svn20090204), libswscale-dev (>= 3:0.svn20090204), libavutil-dev, libv4l-dev (>= 0.8.3), libbz2-dev, libsys-mmap-perl, libav-tools, libnetpbm10-dev, libavdevice-dev, libdevice-serialport-perl, libarchive-zip-perl, libmime-lite-perl, libvlccore-dev, libvlc-dev, libcurl4-gnutls-dev | libcurl4-nss-dev | libcurl4-openssl-dev, libgcrypt11-dev, libpolkit-gobject-1-dev
|
||||
Build-Depends: debhelper (>= 9), cmake, libphp-serialization-perl, libgnutls-dev | libgnutls28-dev, libmysqlclient-dev | libmariadbclient-dev, libdbd-mysql-perl, libdate-manip-perl, libwww-perl, libjpeg8-dev | libjpeg9-dev | libjpeg62-turbo-dev, libpcre3-dev, libavcodec-dev, libavformat-dev (>= 3:0.svn20090204), libswscale-dev (>= 3:0.svn20090204), libavutil-dev, libv4l-dev (>= 0.8.3), libbz2-dev, libsys-mmap-perl, libav-tools, libnetpbm10-dev, libavdevice-dev, libdevice-serialport-perl, libarchive-zip-perl, libmime-lite-perl, libvlccore-dev, libvlc-dev, libcurl4-gnutls-dev | libcurl4-nss-dev | libcurl4-openssl-dev, libgcrypt11-dev | libgcrypt20-dev, libpolkit-gobject-1-dev
|
||||
Standards-Version: 3.9.4
|
||||
|
||||
Package: zoneminder
|
||||
Architecture: any
|
||||
Depends: ${shlibs:Depends}, ${misc:Depends}, ${perl:Depends}, apache2 | httpd, libapache2-mod-php5 | libapache2-mod-fcgid | php5-fpm, php5-mysqlnd | php5-mysql, libphp-serialization-perl, libdate-manip-perl, libmime-lite-perl, libmime-tools-perl, mariadb-client | mysql-client, libwww-perl, libarchive-tar-perl, libarchive-zip-perl, libdevice-serialport-perl, libpcre3, libav-tools, rsyslog | system-log-daemon, libmodule-load-perl, libsys-mmap-perl, libjson-any-perl, netpbm, libavdevice53, libjpeg8, zip, libnet-sftp-foreign-perl, libio-pty-perl, libexpect-perl, libvlccore5 | libvlccore7, libvlc5, libcurl4-gnutls-dev | libcurl4-nss-dev | libcurl4-openssl-dev, libpolkit-gobject-1-0
|
||||
Depends: ${shlibs:Depends}, ${misc:Depends}, ${perl:Depends}, apache2 | httpd, libapache2-mod-php5 | libapache2-mod-fcgid | php5-fpm, php5-mysqlnd | php5-mysql, libphp-serialization-perl, libdate-manip-perl, libmime-lite-perl, libmime-tools-perl, mariadb-client | mysql-client, libwww-perl, libarchive-tar-perl, libarchive-zip-perl, libdevice-serialport-perl, libpcre3, libav-tools, rsyslog | system-log-daemon, libmodule-load-perl, libsys-mmap-perl, libjson-any-perl, netpbm, libavdevice53, libjpeg8 | libjpeg9 | libjpeg62-turbo, zip, libnet-sftp-foreign-perl, libio-pty-perl, libexpect-perl, libvlccore5 | libvlccore7, libvlc5, libcurl4-gnutls-dev | libcurl4-nss-dev | libcurl4-openssl-dev, libpolkit-gobject-1-0
|
||||
Recommends: mysql-server | mariadb-server
|
||||
Description: Video camera security and surveillance solution
|
||||
ZoneMinder is intended for use in single or multi-camera video security
|
||||
|
@ -38,3 +38,11 @@ Description: debugging syumbols for zoneminder.
|
|||
video security system and for commercial or professional video security
|
||||
and surveillance. It can also be integrated into a home automation system
|
||||
via X.10 or other protocols.
|
||||
|
||||
Package: libzoneminder-dev
|
||||
Section: libdevel
|
||||
Architecture: any
|
||||
Depends: ${misc:Depends}
|
||||
Description: Development files for ZoneMinder plugins
|
||||
This package add the necessary files to develop video analysis plugins for
|
||||
the ZoneMinder camera security and surveillance solution.
|
||||
|
|
|
@ -0,0 +1,3 @@
|
|||
usr/include/zoneminder/*
|
||||
usr/lib/*/libzoneminder.a
|
||||
usr/lib/*/pkgconfig/libzoneminder.pc
|
|
@ -22,7 +22,9 @@ override_dh_auto_configure:
|
|||
-DZM_CGIDIR=/usr/lib/cgi-bin \
|
||||
-DZM_WEB_USER=www-data \
|
||||
-DZM_WEB_GROUP=www-data \
|
||||
-DCMAKE_INSTALL_SYSCONFDIR=etc/zm
|
||||
-DCMAKE_INSTALL_SYSCONFDIR=etc/zm \
|
||||
-DZM_PLUGIN_SUPPORT=ON \
|
||||
-DZM_PLUGINSPKGLIBDIR=/usr/lib/zoneminder/plugins
|
||||
|
||||
override_dh_auto_install:
|
||||
dh_auto_install --buildsystem=cmake
|
||||
|
|
|
@ -16,3 +16,12 @@ configure_file(zoneminder-tmpfiles.conf.in "${CMAKE_CURRENT_BINARY_DIR}/zonemind
|
|||
install(FILES "${CMAKE_CURRENT_BINARY_DIR}/com.zoneminder.systemctl.policy" DESTINATION "${PC_POLKIT_PREFIX}/${CMAKE_INSTALL_DATAROOTDIR}/polkit-1/actions")
|
||||
install(FILES "${CMAKE_CURRENT_BINARY_DIR}/com.zoneminder.systemctl.rules" DESTINATION "${PC_POLKIT_PREFIX}/${CMAKE_INSTALL_DATAROOTDIR}/polkit-1/rules.d")
|
||||
|
||||
if(ZM_PLUGIN_SUPPORT)
|
||||
configure_file(plugins.conf.in "${CMAKE_CURRENT_BINARY_DIR}/plugins.conf" @ONLY)
|
||||
install(FILES "${CMAKE_CURRENT_BINARY_DIR}/plugins.conf" DESTINATION "${ZM_CONFIG_DIR}")
|
||||
include(FindPkgConfig QUIET)
|
||||
if(PKG_CONFIG_FOUND)
|
||||
configure_file(libzoneminder.pc.in "${CMAKE_CURRENT_BINARY_DIR}/libzoneminder.pc" @ONLY)
|
||||
install(FILES "${CMAKE_CURRENT_BINARY_DIR}/libzoneminder.pc" DESTINATION "${CMAKE_INSTALL_LIBDIR}/pkgconfig")
|
||||
endif()
|
||||
endif(ZM_PLUGIN_SUPPORT)
|
||||
|
|
|
@ -9,12 +9,12 @@ EXTRA_DIST = \
|
|||
com.zoneminder.systemctl.policy.in \
|
||||
com.zoneminder.systemctl.rules.in
|
||||
|
||||
if ZM_HAS_PLUGIN_SUPPORT
|
||||
if ZM_PLUGIN_SUPPORT
|
||||
EXTRA_DIST += plugins.conf.in
|
||||
|
||||
# Install a pkg-config file for a proper handling of the libzm
|
||||
# Install a pkg-config file for a proper handling of the libzoneminder
|
||||
# convenience library
|
||||
pkgconfigdir = $(libdir)/pkgconfig
|
||||
pkgconfigdir = ${libdir}/pkgconfig
|
||||
pkgconfig_DATA = libzoneminder.pc
|
||||
|
||||
sysconf_DATA = plugins.conf
|
||||
|
|
|
@ -1,17 +1,17 @@
|
|||
prefix=@prefix@
|
||||
exec_prefix=${prefix}
|
||||
libdir=@libdir@
|
||||
pkglibdir = @PLUGINSLIBDIR@
|
||||
includedir=@includedir@
|
||||
sysconfdir = @PLUGINSCONFDIR@
|
||||
webdir = @PLUGINSWEBDIR@
|
||||
prefix = @ZM_PREFIX@
|
||||
exec_prefix = ${prefix}
|
||||
libdir = @ZM_PLUGINSLIBDIR@
|
||||
pkglibdir = @ZM_PLUGINSPKGLIBDIR@
|
||||
includedir = ${prefix}/include
|
||||
sysconfdir = @ZM_PLUGINSCONFDIR@
|
||||
webdir = @ZM_PLUGINSWEBDIR@
|
||||
|
||||
Name: : ZoneMinder convenience library for plugin development.
|
||||
Name: @ZM_PROJECTNAME@
|
||||
Description: ZoneMinder convenience library for plugin development.
|
||||
Version: @PACKAGE_VERSION@
|
||||
Version: @ZM_VERSION@
|
||||
Requires:
|
||||
Requires.private:
|
||||
Conflicts:
|
||||
Libs: -L${libdir} -lzoneminder @LIBS@
|
||||
Libs.private :
|
||||
Cflags: -I${includedir}/@PACKAGE@
|
||||
Libs.private:
|
||||
Cflags: -I${includedir}/zoneminder
|
||||
|
|
|
@ -3993,7 +3993,7 @@ body = "ZM alarm detected - %EL% secs, %EF%/%EFA% frames, t%EST%/m%ESM%/a%ESA% s
|
|||
},
|
||||
{
|
||||
name => "ZM_PATH_PLUGINS",
|
||||
default => "@PLUGINSLIBDIR@",
|
||||
default => "@ZM_PLUGINSPKGLIBDIR@",
|
||||
description => "Path to the plugin folder",
|
||||
help => "3d-party plugins have to be placed here.",
|
||||
type => $types{abs_path},
|
||||
|
@ -4001,7 +4001,7 @@ body = "ZM alarm detected - %EL% secs, %EF%/%EFA% frames, t%EST%/m%ESM%/a%ESA% s
|
|||
},
|
||||
{
|
||||
name => "ZM_PLUGIN_EXTENSION",
|
||||
default => "@PLUGINSEXT@",
|
||||
default => "@ZM_PLUGINSEXT@",
|
||||
description => "Default extension of plugins to found.",
|
||||
help => "Default extension of plugins to found.",
|
||||
type => $types{rel_path},
|
||||
|
@ -4017,7 +4017,7 @@ body = "ZM alarm detected - %EL% secs, %EF%/%EFA% frames, t%EST%/m%ESM%/a%ESA% s
|
|||
},
|
||||
{
|
||||
name => "ZM_PLUGINS_CONFIG_DIR",
|
||||
default => "@PLUGINSCONFDIR@",
|
||||
default => "@ZM_PLUGINSCONFDIR@",
|
||||
description => "Path to the config folder for plugins.",
|
||||
help => "Path to the config folder for plugins.",
|
||||
type => $types{abs_path},
|
||||
|
|
|
@ -6,8 +6,12 @@ configure_file(zm_config.h.in "${CMAKE_CURRENT_BINARY_DIR}/zm_config.h" @ONLY)
|
|||
# Group together all the source files that are used by all the binaries (zmc, zma, zmu, zms etc)
|
||||
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_exception.cpp zm_file_camera.cpp zm_ffmpeg_camera.cpp zm_image.cpp zm_jpeg.cpp zm_libvlc_camera.cpp zm_local_camera.cpp zm_monitor.cpp zm_ffmpeg.cpp zm_mpeg.cpp zm_poly.cpp zm_regexp.cpp zm_remote_camera.cpp zm_remote_camera_http.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_thread.cpp zm_time.cpp zm_timer.cpp zm_user.cpp zm_utils.cpp zm_zone.cpp)
|
||||
|
||||
if(ZM_PLUGIN_SUPPORT)
|
||||
set(ZM_BIN_SRC_FILES ${ZM_BIN_SRC_FILES} zm_detector.cpp zm_image_analyser.cpp zm_plugin.cpp zm_plugin_manager.cpp)
|
||||
endif(ZM_PLUGIN_SUPPORT)
|
||||
|
||||
# A fix for cmake recompiling the source files for every target.
|
||||
add_library(zm STATIC ${ZM_BIN_SRC_FILES})
|
||||
add_library(zoneminder STATIC ${ZM_BIN_SRC_FILES})
|
||||
|
||||
add_executable(zmc zmc.cpp)
|
||||
add_executable(zma zma.cpp)
|
||||
|
@ -16,14 +20,18 @@ add_executable(zmf zmf.cpp)
|
|||
add_executable(zms zms.cpp)
|
||||
add_executable(zmstreamer zmstreamer.cpp)
|
||||
|
||||
target_link_libraries(zmc zm ${ZM_EXTRA_LIBS} ${ZM_BIN_LIBS})
|
||||
target_link_libraries(zma zm ${ZM_EXTRA_LIBS} ${ZM_BIN_LIBS})
|
||||
target_link_libraries(zmu zm ${ZM_EXTRA_LIBS} ${ZM_BIN_LIBS})
|
||||
target_link_libraries(zmf zm ${ZM_EXTRA_LIBS} ${ZM_BIN_LIBS})
|
||||
target_link_libraries(zms zm ${ZM_EXTRA_LIBS} ${ZM_BIN_LIBS})
|
||||
target_link_libraries(zmstreamer zm ${ZM_EXTRA_LIBS} ${ZM_BIN_LIBS})
|
||||
target_link_libraries(zmc -ldl zoneminder ${ZM_EXTRA_LIBS} ${ZM_BIN_LIBS})
|
||||
target_link_libraries(zma -ldl zoneminder ${ZM_EXTRA_LIBS} ${ZM_BIN_LIBS})
|
||||
target_link_libraries(zmu -ldl zoneminder ${ZM_EXTRA_LIBS} ${ZM_BIN_LIBS})
|
||||
target_link_libraries(zmf -ldl zoneminder ${ZM_EXTRA_LIBS} ${ZM_BIN_LIBS})
|
||||
target_link_libraries(zms -ldl zoneminder ${ZM_EXTRA_LIBS} ${ZM_BIN_LIBS})
|
||||
target_link_libraries(zmstreamer -ldl zoneminder ${ZM_EXTRA_LIBS} ${ZM_BIN_LIBS})
|
||||
|
||||
install(TARGETS zmc zma zmu zmf zmstreamer RUNTIME DESTINATION "${CMAKE_INSTALL_FULL_BINDIR}" PERMISSIONS OWNER_WRITE OWNER_READ OWNER_EXECUTE GROUP_READ GROUP_EXECUTE WORLD_READ WORLD_EXECUTE)
|
||||
install(TARGETS zms RUNTIME DESTINATION "${ZM_CGIDIR}" PERMISSIONS OWNER_WRITE OWNER_READ OWNER_EXECUTE GROUP_READ GROUP_EXECUTE WORLD_READ WORLD_EXECUTE)
|
||||
install(CODE "execute_process(COMMAND ln -sf zms nph-zms WORKING_DIRECTORY \"\$ENV{DESTDIR}${ZM_CGIDIR}\")")
|
||||
|
||||
if(ZM_PLUGIN_SUPPORT)
|
||||
install(FILES jinclude.h zm_db.h zm_detector.h zm_logger.h zm_poly.h zm_mem_utils.h zm_box.h zm_ffmpeg.h zm_plugin_manager.h zm_plugin.h zm_config.h zm_config_defines.h zm_jpeg.h zm_mpeg.h zm_image_analyser.h zm_zone.h zm_rgb.h zm_utils.h zm.h zm_event.h zm_stream.h zm_coord.h zm_image.h DESTINATION include/zoneminder)
|
||||
install(TARGETS zoneminder ARCHIVE DESTINATION "${CMAKE_INSTALL_LIBDIR}")
|
||||
endif(ZM_PLUGIN_SUPPORT)
|
||||
|
|
|
@ -144,7 +144,7 @@ noinst_HEADERS = \
|
|||
zm_timer.h \
|
||||
zm_user.h
|
||||
|
||||
if ZM_HAS_PLUGIN_SUPPORT
|
||||
if ZM_PLUGIN_SUPPORT
|
||||
# Add objects to zm binaries for plugins management
|
||||
zm_SOURCES += \
|
||||
zm_detector.cpp \
|
||||
|
|
Loading…
Reference in New Issue