C requires prototypes or compilers will complain about them missing. Our
library entry points do not have such, therefore add the macro
FREERDP_ENTRY_POINT which declares the function prototype automatically
before the function.
Building client channels out of tree does not work reliable as the
dependencies can not be easily split. (exceptions may be simple ones
as echo channel)
It does complicate the build system and code though, so remove this
for maintainability reasons.
If -DBUILTIN_CHANNELS=OFF is supplied to cmake, auxiliary channel modules
are built as plugins, that are loaded from $LIBDIR/freerdp as shared libs.
This patch fixes the linkage of these plugins by taking inter-channel dependencies
of this separation into account. If BUILTIN_CHANNELS=ON, these channel modules
are linked directly into the main modules. Therefore, the linking of the plugins
is conditioned accordingly.
Covscan report contains various memory leak defects which were marked
as important. I have spent some time analyzing them and although they
were marked as important, most of them are in error cases, so probably
nothing serious. Let's fix most of them anyway. The rest are false
positives, or too complicated to fix, or already fixed in master, or
simply I am unsure about them.
Relates: https://github.com/FreeRDP/FreeRDP/issues/6981
rdp2tcp was wrongly exposed as cmake target. This could lead to errors
like the following when the FreeRDP2 cmake file was required:
CMake Error at ../lib/cmake/FreeRDP2/FreeRDPTargets.cmake:73 (message):
The imported target "rdp2tcp-client" references the file
".../lib/freerdp2/librdp2tcp-client.a"
but this file does not exist. Possible reasons include:
* The file was deleted, renamed, or moved to another location.
* An install or uninstall procedure did not complete successfully.
* The installation package was faulty and contained
".../lib/cmake/FreeRDP2/FreeRDPTargets.cmake"
but not all the files it references.