Commit Graph

317 Commits

Author SHA1 Message Date
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
Isaac Connor 2eda49333f Merge branch 'master' into zma_to_thread 2020-10-20 16:20:29 -04:00
Isaac Connor 7f06920f4a convert polkit FATAL_ERROR to a WARNING so that codeQL will build 2020-10-02 10:33:42 -04:00
Isaac Connor 06519895d4 FATAL_ERROR to WARNING. The purpose is to allow codeQL to build cpp even though the perl deps havn't been installed. 2020-10-02 09:04:03 -04:00
Isaac Connor 5fb56c9f57 Merge branch 'master' into zma_to_thread 2020-08-07 17:52:43 -04:00
Andrew Bauer 92cc03dbe8 fix pod2man out-of-source builds 2020-08-04 21:07:49 -05:00
Isaac Connor 869860bb26 Merge branch 'master' into zma_to_thread 2020-07-21 17:49:39 -04:00
Isaac Connor 7575afc8d5 Merge branch 'master' into zma_to_thread 2020-07-21 17:38:32 -04:00
Isaac Connor dd25cb3b4e We always build onvif 2020-05-09 17:34:15 -04:00
Isaac Connor 75082064fd Merge branch 'master' of github.com:zoneminder/ZoneMinder into onvif_updated_to_upstream 2020-05-09 16:40:17 -04:00
Isaac Connor 732bb5416f Merge branch 'master' into onvif_updated 2020-05-09 16:26:29 -04:00
Isaac Connor 4ff341a0f5 Merge branch 'master' into zma_to_thread 2020-05-02 18:03:42 -04:00
Isaac Connor ed7c0815de Merge branch 'release-1.34' 2020-04-24 17:05:32 -04:00
Isaac Connor e79a9d5abf Can't set this policy yet as we havn't deprecate trusty for 1.34 2020-04-23 18:33:58 -04:00
Isaac Connor 01a2880100 fix build outside of build directory 2020-04-23 18:18:04 -04:00
hax0kartik 32c137bb8e Do not look for gnutls if libjwt is not found 2020-04-23 18:00:00 -04:00
Isaac Connor 4b53c7660e
Merge pull request #2911 from hax0kartik/dl-curl
Dynamically load libcurl, libvlc and libvnc
2020-04-22 09:49:37 -04:00
Isaac Connor 89b199625a Add Optimised setting to use -O3 2020-04-14 16:59:22 -04:00
hax0kartik f15ffee043 Do not include the static libvnc library 2020-04-14 03:11:28 +05:30
hax0kartik 640dfdd4a0 Dynamically load libvnc at runtime 2020-04-14 02:46:01 +05:30
hax0kartik 1c4e4abbab Do not look for gnutls if libjwt is not found 2020-04-14 00:40:47 +05:30
hax0kartik 143ad394a9 Dynamically load libvlc 2020-04-14 00:15:06 +05:30
hax0kartik 3a8b931cda Fix stuff 2020-04-08 12:52:09 -04:00
hax0kartik 64f57aa373 Dynamically load libcurl at runtime 2020-04-08 05:18:16 -04:00
Isaac Connor 14c28715d8 Fix warnings about hashed authentication not being available when using gnutls. Also set cmake_policy(SET CMP0054 NEW) to quiet warnings 2020-04-05 13:36:20 -04:00
Isaac Connor 2d5d87839f Fix warnings about hashed authentication not being available when using gnutls. Also set cmake_policy(SET CMP0054 NEW) to quiet warnings 2020-04-05 13:35:21 -04:00