Commit Graph

25 Commits

Author SHA1 Message Date
Robert Adam
bb252f6428 BUILD(cmake): Fix unity build failure
If the *_plugin_import.cpp files already exist before the latest cmake
changes for unity builds are pulled, the necessary property does not get
set on these files, which can cause build failure.
2021-03-07 19:19:49 +01:00
Robert Adam
89693f6bcb BUILD(cmake): Exclude files from unity build
The *_plugin_import files will cause collisions in a unity build, so we
have to make sure that they are built separately as usual.

Furthermore the ObjecticeC files don't play well in unity builds (it
seems like they are then treated as cpp files). Thus they are excluded
from that as well.

WinGUID.cpp must also not be included as that breaks the DEFINE_GUID
macro wizardry needed to avoid redefinition errors.
2021-03-06 18:57:22 +01:00
Robert Adam
ff40c92ab4 BUILD(cmake): Use big file linker option
Using a unity build tends to create large source files. With that it is
easily possible to hit the object file's size limit resulting in the
"C1128: number of sections exceeded object file format limit" (MSVC) or
"File too big" (GCC) error.

In order to avoid this, this commit sets the necessary flag to extend
that limit.
2021-03-06 18:57:22 +01:00
Robert Adam
cdbc405887
Merge pull request #4810: MAINT: Copyright update
This PR updates the copyright notices of all files. For doing so
it introduces a script that can do this automatically.

Furthermore a few files that are no longer needed got removed.
2021-03-02 19:31:28 +01:00
Robert Adam
59ae429972 MAINT: Update copyright notice to 2021
This was done by running scripts/updateLicenseHeaders.py and then
manually editing the LICENSE file.
2021-03-02 10:15:01 +01:00
Joseph Utecht
27abb09371 BUILD(cmake): Fix pkg search on case-insensitive filesystems
If a package is searched for with multiple casings (as is currently the
case for libsndfile), it will be very hard to use the resulting cmake variables
(e.g. <name>_FOUND, <name>_LIBRARIES) as one does not know which casing was
eventually found.

This issue actually broke the build on macOS when installing libsndfile
via homebrew.

This change sets the all-lowercase version of the package
name variables (if multiple cases of the spelling are contained in the
package's aliases) so that this can then be used further down to reference
the result, without needing to iterate through all the options again to
determine which case was found.

Fixes #4790
2021-02-27 12:02:17 -06:00
freddii
9889a0fa99 DOCS: fixed typos 2021-01-20 22:17:38 +01:00
Nik Reist
88e1786849 REFAC(installer-msi) Simplify WiX component install
Remove CPack and previous WiX installer projects and sources
Add toolset and for WixSharp to facilitate client and server builds
individually or collectively.
Add multilanguage build with packaging=ON and translations=ON, and
standard build with packaging=ON. Builds are also aware of client and
server option settings.
Add correct LICENSE to installer
2020-12-11 22:07:25 -05:00
Robert Adam
7babebf0f9 BUILD(cmake): Only install shared libraries
Libraries should only be installed if they are built as shared
libraries. Static libraries should only be needed during Mumble's
compilation and are therefore no required dependencies that have to be
installed alongside Mumble.
2020-10-29 12:02:12 +01:00
Robert Adam
475182d120 BUILD(cmake): Prefer absolute install paths
We need to use relative install paths if we intend to invoke CPack (it
errors on absolute paths) but for everything else we should prefer
absolute paths. This is needed as the dynamic libraries that are being
loaded by Mumble have to be loaded by an absolute file path (and the
macro containing that path is set to the install path's value).
2020-10-28 15:36:27 +01:00
Robert Adam
bf9550a68e
Merge pull request #4503: BUILD(cmake): Revamp install paths
Installation paths can now be fine-tuned by setting the respective
MUMBLE_INSTALLATION_* variables when invoking cmake.

Additionally some components that only had install rules for a certain
OS are now installed on all OSes as these components should be needed
there as well.
2020-10-24 17:38:56 +02:00
Robert
b9b41621c5 BUILD(cmake): Revamp install paths
Installation paths can now be fine-tuned by setting the respective
MUMBLE_INSTALLATION_* variables when invoking cmake.

Additionally some components that only had install rules for a certain
OS are now installed on all OSes as these components should be needed
there as well.
2020-10-24 15:57:01 +02:00
Robert
767b29d69c BUILD(cmake): Fix gRPC not being found
We are using a custom FindGRPC.cmake script in order to locate the gRPC
targets as not all distribution variants of gRPC include the respective
cmake support. Those that do however will use "gRPC" (note the lowercase
"g") as the target's name and therefore our current way of searching for
it via find_pkg won't find them.

The solution is to first look for "gRPC" and only if that fails, check
for "GRPC". This way the official target "gRPC" should be found and
preferred if present.

Fixes #4508

Co-Authored-By: Thomas Lange <thomas-lange2@gmx.de>
2020-10-24 14:47:06 +02:00
Robert
eddd5332dc BUILD(cmake): Fix use of generator expression (follow-up)
This usage of a generator expression has been overlooked in #4533.
2020-10-16 15:58:13 +02:00
Robert
5cf9dde08b BUILD(cmake): Fix use of generator expression
The changed files used a generator expression in an if-statement, which
is invalid as these generator expressions are not evaluated during the
initial configuration stage (at which point the if-statement is
evaluated).

This commit changes the use of the generator-expression in such a way
that it will actually do what it was meant to.

Note that this commit also enables position independent code for all
platforms and all build-types instead of only for debug builds on unix
systems. This was the preferred choice instead of porting the -fPIE
compiler option to use proper generator expressions as the presence of
these options caused linking errors with Celt/Opus.
2020-10-13 16:25:52 +02:00
Robert
a854ef022e BUILD(cmake): Don't warn about PDBs not being found (MSVC) 2020-09-28 11:33:55 +02:00
Robert
42d9f2dab8 BUILD(cmake): Remove unneeded, commented lines 2020-09-11 18:14:05 +02:00
Robert
a8a857928d BUILD(cmake): Don't re-use BUILD_TESTING
We used the BUILD_TESTING variable in order to indicate whether or not
tests shall be built. However this variable is used by e.g. CTest
already and there it had a different default value. Therefore we now
deprecate BUILD_TESTING and use the tests option instead.

This also fits better with our other options in terms of casing.
2020-09-11 18:13:56 +02:00
Robert Adam
fda302af98 BUILD(cmake): Added debug-dependency-search option
If the user uses -Ddebug-dependency-search=OFF, then the find_pkg
function will not perform its searches using the QUIET flag causing a
lot of (valuable) information to be printed to the screen.
2020-08-31 17:30:53 +02:00
Davide Beatrici
847bdb7079 FIX(cmake): set CMAKE_WIX_UPGRADE_GUID and generate CMAKE_WIX_PRODUCT_GUID
This commit fixes two issues:

1. The installer ignoring Mumble < 1.4.0 installations. This resulted in two separate entries in the installed programs list and a cluttered installation folder.
2. The installer thinking that the product is already installed even if it's a different build.

The first problem was caused by CMAKE_WIX_UPGRADE_GUID being explicitely set to a wrong value, due to an extra line in the file.

The second problem was caused by CMAKE_WIX_PRODUCT_GUID being explicitely set to a static value due to us misunderstanding the "ProjectGuid" variable in the WiX project we used until 1.4.0.
We thought it referred to the MSI product GUID, but instead it's just the MSBuild project identifier.
Also, CMake's WiX documentation clearly says that the installer will abort if it detects a pre-existing installation that uses the same GUID: https://cmake.org/cmake/help/latest/cpack_gen/wix.html#variable:CPACK_WIX_PRODUCT_GUID
2020-08-11 04:03:16 +02:00
Robert Adam
e0a27b1e7a MAINT(cmake): Only return compilable targets
Without this change it could happen that get_targets returned
non-compilable targets (e.g. install or uninstall targets) and this
could lead to errors when e.g. trying to set compile options on those
targets.
2020-08-10 20:57:39 +02:00
Robert Adam
884fc40bc5 MAINT: Disable warnings for 3rdparty projects
In order to not be spammed with warnings from 3rdparty projects that we
make use of in Mumble, this commit modifies the respective cmake files
in a way that disables warnings for the respective projects.
2020-08-09 16:10:53 +02:00
Robert Adam
4010db10c2 Error on unknown architecture 2020-07-11 23:33:25 +02:00
Nik Reist
b30ee28acb cmake: add include file containing CPack-specific stuff 2020-07-11 23:33:21 +02:00
Davide Beatrici
f08cfe5fa4 Add CMake functions and modules 2020-07-11 19:34:49 +02:00