libretroshare (not all build options yet) and it's dependencies can now
be built using CMake instead of qmake.
Even Qt itself deprecated qmake, which is not developed anymore, as
build system and it was making many things much more difficult
and requiring an enormous amount of black magic to support a wide
range of platforms.
libretroshare can now easly be build as static or shared library with
simple commands and a maintaniable build system:
```
cmake \
-D RS_LIBRETROSHARE_STATIC=OFF -D RS_LIBRETROSHARE_SHARED=ON \
-S $YOUR_RS_SOURCE_DIR/libretroshare/ -B .
make
```
FSFE licensing checking program lint is now happy
$ reuse lint
* Bad licenses:
* Missing licenses:
* Unused licenses:
* Used licenses: AGPL-3.0-only, AGPL-3.0-or-later, Apache-2.0, CC-BY-SA-4.0, CC0-1.0, GPL-3.0-or-later, LGPL-3.0-or-later, MIT
* Read errors: 0
* Files with copyright information: 6324 / 6324
* Files with license information: 6324 / 6324
Congratulations! Your project is compliant with version 3.0 of the REUSE Specification :-)
/libbitdht/src/bitdht/bdnode.h:259: warning:
Cppcheck(duplInheritedMember): The class 'bdNodeManager' defines member
variable with name 'mFns' also defined in its parent class 'bdNode'.
Restructure and document retroshare.pri variables and helper functions
Link sqlite statically like other libraries on Android
qmake has multiple win32-* specs match them correctly
Move a buch of generic thing to retroshare.pri instead of having them replocated
accross project specific .pro
Fix retroshare-gui too many symbols exported on windows liking error by adding
QMAKE_LFLAGS+=-Wl,--exclude-libs,ALL
Rename retroshare-gui/src/util/win32.h because the name is too prone to
confusion and build conflicts
libreasapi avoid usage of cretar_prl link_prl that seems unreliable on some
platforms
libreasapi rename LIBRESAPI_QT to more understendable LIBRESAPI_SETTINGS
Use use_*.pri instead of copy pasting error prone qmake snippets around
Expose bitdht option to retroshare.pri
Add RS_THREAD_LIB qmake variable for better crossplatform support
Move debug and profiling generic options to retroshare.pri (avoid copy/pasting)
Remove Qt script module in qmake as it is not available anymore
/libbitdht/src/bitdht/bdconnection.cc:1288: warning: this statement may
fall through [-Wimplicit-fallthrough=]
if (errsrc == BITDHT_CONNECT_ERROR_SOURCE_END)
/libbitdht/src/bitdht/bdconnection.cc:1308: here
case BITDHT_CONNECT_ERROR_DUPLICATE: // similar attempt. delay/
recycle (ANY/ANY)
Unix API: Undefined allocation of 0 bytes (CERT MEM04-C; CWE-131): Call
to 'malloc' has an allocation size of 0 bytes
1: Loop body executed 0 times in /home/phenom/GIT/RetroShare/trunk/
libbitdht/src/util/bdbloom.cc:223
2: Calling 'bloomFilter::getFilter' in /home/phenom/GIT/RetroShare/
trunk/libbitdht/src/util/bdbloom.cc:240
3: 'bytes' initialized to 0 in /home/phenom/GIT/RetroShare/trunk/
libbitdht/src/util/bdbloom.cc:141
4: Call to 'malloc' has an allocation size of 0 bytes in /home/phenom/
GIT/RetroShare/trunk/libbitdht/src/util/bdbloom.cc:148
/libbitdht/src/util/bdnet.h:107: warning: 'bdnet_inet_ntoa' has C-
linkage specified, but returns user-defined type 'std::string' (aka
'basic_string<char>') which is incompatible with C [-Wreturn-type-c-
linkage]
std::string bdnet_inet_ntoa(struct in_addr in);
^
Although it's already quite ugly that we overwrite QMAKE_CC like this,
hardcoding 'g++' can break the build where prefixed versions of
the toolchain are expected and where QMAKE_CXX is already properly
defined. So we just use QMAKE_CXX variable here.
This fixes build failures on some distributions, e.g.
https://galileo.mailstation.de/jenkins/job/lipidity/36/console
- The advantage is that this method automatically includes additional
dependencies of LIBS (e.g. libupnp needs -lixml).
- Also if some distribution moves headers to non default locations the
correct locations get added by PKGCONFIG
Allows installation of for example only retroshare-nogui, without
installing files only relevant for gui
$ qmake
$ make retroshare-nogui
$ make retroshare-nogui-install_subtargets