JSON-RPC/QtLanguageServer: Enforce static builds


[ChangeLog][Important Behavior Change] The (private) JsonRpc and
LanguageServer modules are now always build as static libraries.

This is meant to ensure that the qmlls binary can always work when
installed. Before, in a Qt installation from the installer, one would
end up with a binary missing some of its runtime dependencies, as the
language server repository is not essential.

To enable static builds, we also need to modify the export macros,
otherwise the build breaks on Windows. In addition, remove the
QT_BEGIN/END_NAMESPACE marcos around the defines which serve no purpose,
remove the NO_GENERATE_CPP_EXPORTS which is not needed for STATIC only
modules, and add a comment to the global file to indicate what change is
needed should the module become non-STATIC only again.

Pick-to: 6.8
Change-Id: If77dfc3fc9a03711e6e8d33181087dbf8735cdf6
Reviewed-by: Ulf Hermann <ulf.hermann@qt.io>
commit1a9a75cacaf4c45fc399915804f7f25d17747343
parent85a56bf6c8e4254045d92f9d145c552add5747b5
authorFabian Kosmale <fabian.kosmale@qt.io>
committerFabian Kosmale <fabian.kosmale@qt.io>
commit timeFri, 21 Jun 2024 11:32:51 +0200