Commit Graph

342 Commits

Author SHA1 Message Date
Isaac Connor d056f15e54 Add arp-scan to executable for use in network probing for cameras. 2022-02-07 12:32:16 -05:00
Jonathan Bennett ec9403fb6f Adds Amcrest On-camera Motion Detection 2022-01-25 22:38:00 -06:00
Jonathan Bennett 3a9c16aeea First working Janus build 2022-01-10 23:22:37 -06:00
Jonathan Bennett 1333d8c751 Adds ONVIF Motion Detection Support 2022-01-06 16:45:15 -06:00
Isaac Connor 67556430c6 Add option ZM_NO_PCRE to disable testing for libpcre3. debian wants to remove it so this allows us to test building without it. Remove libpcre3 from depends and set ZM_NO_PCRE=ON in debian build config 2021-11-24 12:44:07 -05:00
Peter Keresztes Schmidt 6e96cbe14a Misc: Merge ZM_HAS_V4L with ZM_HAS_V4L2 2021-09-08 00:19:08 +02:00
Peter Keresztes Schmidt c83882a4c7 Build: Move V4L2 detection into its own module
Improves detection across different platforms (esp. FreeBSD) since system paths are automatically taken into account (this is in contrast to check_include_file).
2021-09-08 00:18:24 +02:00
Andrew Bauer b59e911c43 Allow cakephp cache engine to be set during build 2021-06-18 12:12:01 -05:00
Peter Keresztes Schmidt 0d81199fc9 Build: Require at least FFmpeg 3.2 (libavutil 55.34.100) 2021-06-05 20:40:12 +02:00
Peter Keresztes Schmidt 5c96eedac8 Build: Remove dependency on libavdevice
We currently don't use the library so don't depend on it.
2021-06-05 15:08:38 +02:00
Peter Keresztes Schmidt 3d34e6f177 Build: Promote libswresample to a required dependency
FFmpeg is an integral component of ZM. Promote the appropriate libraries to required dependencies.
This reduces the possible build configurations greatly and thus maintenance burden.
2021-06-05 14:27:42 +02:00
Peter Keresztes Schmidt 762476ec76 Build: Promote libswscale to a required dependency
FFmpeg is an integral component of ZM. Promote the appropriate libraries to required dependencies.
This reduces the possible build configurations greatly and thus maintenance burden.
2021-06-05 14:27:31 +02:00
Peter Keresztes Schmidt a9ad5c5eee Build: Promote libavcodec to a required dependency
FFmpeg is an integral component of ZM. Promote the appropriate libraries to required dependencies.
This reduces the possible build configurations greatly and thus maintenance burden.
2021-06-05 14:25:54 +02:00
Peter Keresztes Schmidt 7d15396833 Build: Promote libavformat to a required dependency
FFmpeg is an integral component of ZM. Promote the appropriate libraries to required dependencies.
This reduces the possible build configurations greatly and thus maintenance burden.
2021-06-05 14:25:27 +02:00
Peter Keresztes Schmidt 1a6904a297 Build: Promote libavutil to a required dependency
FFmpeg is an integral component of ZM. Promote the appropriate libraries to required dependencies.
This reduces the possible build configurations greatly and thus maintenance burden.
2021-06-05 14:21:41 +02:00
Peter Keresztes Schmidt 7d501a6585 Remove libavresample support
libavresample hasn't been maintained for a long time by FFmpeg since libswresample superseded it.
In 2018 it was officially deprecated [1].

Let's remove the support for it since there is no need to maintain this option further.

[1] https://patchwork.ffmpeg.org/project/ffmpeg/patch/20171225175335.18183-1-atomnuker@gmail.com/
2021-06-04 23:46:58 +02:00
Peter Keresztes Schmidt 32f139ef7f Build: Use FFmpeg package CMake module 2021-06-04 23:18:30 +02:00
Peter Keresztes Schmidt 7ec37405a6 Build: Don't include unused CheckStructHasMember module 2021-06-01 08:43:49 +02:00
Peter Keresztes Schmidt e724a93395 Build: Remove in-tree version of CheckPrototypeDefinition
We currently don't use the module and all supported CMake versions ship this module if needed.
2021-06-01 08:41:44 +02:00
Peter Keresztes Schmidt f2bee0704a LocalCamera: Remove support for V4L1
Kernel support for Video4Linux 1 was removed in 2.6.38 (March 2011). It's time to drop support on our side.
2021-05-31 23:29:29 +02:00
Peter Keresztes Schmidt 8129600a37 Build: Cleanup gnutls/openssl defines
We only need HAVE_LIBGNUTLS and HAVE_LIBOPENSSL to compile the right crypto backend.
2021-05-30 22:56:21 +02:00
Peter Keresztes Schmidt 45654cb514 Build: Make the JWT backend selectable
Introduce the -DZM_JWT_BACKEND CMake option through which the JWT backend can be selected.
Supported values: jwt_cpp (default; in-tree) and libjwt

When libjwt is chosen ZM_CRYPTO_BACKEND is taken into account to select the corresponding flavour of libjwt.
2021-05-29 21:37:30 +02:00
Peter Keresztes Schmidt caadc41bfd Build: Make the crypto backend selectable
Introduce the -DZM_CRYPTO_BACKEND CMake option through which the crypto backend can be selected.
Supported values: openssl (default) and gnutls

This commit makes OpenSSL or GnuTLS a requirement to compile/run ZoneMinder.

Following restriction applies:
  * If libjwt is not found we fall back to jwt-cpp which only supports OpenSSL
2021-05-29 21:37:30 +02:00
Peter Keresztes Schmidt b81689aa3f Remove libgcrypt as dependency
GnuTLS used gcrypt as backend but switched in ~2011 to nettle.
Thus we don't need to/shouldn't depend on it.
2021-05-29 21:37:30 +02:00
Peter Keresztes Schmidt bf08502b9c Build: Add CMake option to enable Werror
With -DENABLE_WERROR the -Werror flag will be passed to the compiler failing the build if a warning is emitted.
2021-05-01 00:07:12 +02:00
Peter Keresztes Schmidt 3b705c15fe build: Store all generated sources in CMAKE_BINARY_DIR
config.h is already generated there so move zm_config_data.h and zm_config_define.h
there as well. Also limit the scope of CMAKE_BINARY_DIR as include directory to the zm target.
All in all this makes zm_config_data and zm_config_define available when building the tests target.
2021-04-11 01:28:23 +02:00
Isaac Connor 0da9ee2e4c Remove live555 detection 2021-03-11 08:08:01 -05:00
Peter Keresztes Schmidt c33b5a4393 Move in-tree dependencies to their own folder
src/ should only contain our code. Move the in-tree dependencies to dep/
This allows us (if necessary) to e.g. exclude that part of the tree from being analyzed by
various tools or mark it as external code in IDEs.
2021-02-28 02:12:07 +01:00
Peter Keresztes Schmidt 866bcc9518 build: Cleanup CMakeLists.txt of libbcrypt
Remove unnecessary cruft and make sure it uses our compile options as dictated by zm-dependency-interface.
An additional step towards a warning-free compile.

Define __SKIP_GNU on BSD since they have their own bcrypt implementation.
2021-02-28 02:12:07 +01:00
Peter Keresztes Schmidt 4c07bf5aae Build: Add ThreadSanitizer (TSan) support
Enable it by setting -DTSAN=1
This setting is mutually exclusive with -DASAN
2021-02-11 00:38:31 +01:00
Peter Keresztes Schmidt 426cace32e Build: Raise required CMake version to 3.5.0
This is the version found in Xenial which is the oldest we support.
2021-02-09 13:20:27 +01:00
Peter Keresztes Schmidt 424e6e14f6 Build: Add -DASAN option to build with AddressSanitizer support
Use this option only for debugging purposes.
2021-02-08 23:13:31 +01:00
Peter Keresztes Schmidt 825ca07561 Build: Use zm-* interfaces to set cxx standard and warning flags 2021-02-08 23:08:22 +01:00
Peter Keresztes Schmidt 44be2ccf6c Build: Add a set of interface targets which can be used to set compilation options
zm-compile-option-interface:
  Use to set various compiler/linker flags

zm-feature-interface:
  Use to set required compiler features.
  See https://cmake.org/cmake/help/latest/prop_gbl/CMAKE_CXX_KNOWN_FEATURES.html

zm-warning-interface:
  Use to set compiler warning flags. If need be a zm-no-warning-interface can be added which suppresses all warning for targets linked against it. Useful for in-tree dependencies from which we don't want compiler warnings.

zm-core-interface:
  That's the interface one should normally link against to get all the options.
2021-02-08 23:08:22 +01:00
Peter Keresztes Schmidt 36253048f5 Build: Move platform detection to its own module 2021-02-08 23:08:22 +01:00
Isaac Connor 8f9637f21a
Merge pull request #3129 from Carbenium/cmake-reformat
Build: Reindent the CMakeLists
2021-02-04 17:20:34 -05:00
Peter Keresztes Schmidt 6c9983155c Build: Reindent the CMakeLists
Indent with 2 spaces
Also remove expressions form closing tags. They have been made optional a while ago since they make reading rather more difficult.
2021-02-04 22:00:56 +01:00
Peter Keresztes Schmidt dd527f0888 Consolidate __STDC_FORMAT_MACROS and __STDC_CONSTANT_MACROS definition
Move the definitions to zm_define.h and include the header at the appropriate locations.
These macros have not been adopted by the C++11 standard.
However glibc 2.17 (CentOS 7) still depends on them to provide the macros which are guarded by these defines.
2021-02-04 19:58:29 +01:00
Isaac Connor c57c50fd4a
Merge pull request #3123 from Carbenium/catch2
[RFC] Add Catch2 as C++ test framework and some exemplary tests
2021-02-04 12:57:04 -05:00
Peter Keresztes Schmidt bef4e4032f Add Catch2 as C++ test framework
Use -DCMAKE_BUILD_TEST_SUITE=1 during CMake invocation to activate building the tests.
The 'tests' target builds the unit tests which can then be executed using the 'test' target.

We depend on the Catch2 version of the system.
Since development normally takes place on current OSs, this shouldn't pose a problem.
2021-02-04 18:53:54 +01:00
Isaac Connor 513739aeb5
Merge pull request #3127 from Carbenium/header-cleanup
Cleanup and reorganize includes
2021-02-04 12:52:04 -05:00
Peter Keresztes Schmidt 21fdb1f345 Build: Add libLive555 to optlibsnotfound if not found 2021-02-04 18:02:08 +01:00
Peter Keresztes Schmidt 4db0dea1f2 Build: Make building man pages optional (enabled by default)
Add a new CMake option (-DBUILD_MAN) which can be used
to deactivate the man page build steps.
This is especially useful in a development situation where "make all"
is needlessly slowed down by these build steps.
2021-02-03 21:22:28 +01:00
Isaac Connor d0f307101b Report on finding live555 libs 2021-01-29 15:49:40 -05:00
Isaac Connor f9e003de22 Remove mp4v2 and libx264 from cmake 2021-01-28 09:07:54 -05:00
Isaac Connor 70bef9f22a put back c++11 as the c std 2021-01-26 15:43:29 -05:00
Isaac Connor 284b9f963f Merge branch 'master' into zma_to_thread 2020-12-29 12:18:26 -05:00
Isaac Connor d571b2dd98 Add live555 detection and HAVE_RTSP_SERVER config 2020-12-08 15:59:06 -05:00
Isaac Connor b261fbb397 Merge branch 'master' into zma_to_thread 2020-12-07 16:26:26 -05:00
Isaac Connor 7326af95a9 Add ZM_FONTDIR as a place to store fonts for timestamping 2020-12-01 09:21:25 -05:00