The 2.0.0 release of uvgRTP fails to build on CentOS7, because :
- the gcc-c++ compiler doesn't support the c++17 standard, which is
required to compile the crypto.hh file
- the getrandom() function isn't available in the libc
This pull request adds CentOS7 build support.
The modified files are :
- CMakeLists.txt : the availability of the getrandom() function is checked.
If it exists, the HAVE_GETRANDOM preprocessor definition is added
- src/random.cc : if HAVE_GETRANDOM isn't defined, a syscall equivalent to
the getrandom() functions is called
- include/crypto.hh : the c++17 code is replaced by a code that compiles with
the CentOS7 compiler (c++11)
I have no idea why the name had an underscore but now it's gone.
The old namespace is kept as an alias for backwards-compatibility
but it may be removed in the future
Use __has_include to check if all needed headers are present in the
system and if so, build uvgRTP with crypto enabled.
Introduce new define, __RTP_NO_CRYPTO__ which disables SRTP/ZRTP
support even if Crypto++ is present in the system
Add all new source and header files to Visual Studio, CMake and
QtCreator project files.
Rename rtcp/runner.cc and zrtp/receiver.cc files because they
caused linking problems with QtCreator
Add __RTP_CRYPTO__ around CryptoPP code and remove from all other
places. This should provide a cleaner way of compiling and linking
to the library.
Not sure if I'm totally happy with this solution either but it's
a step to a better direction at least.