Quassel IRC Repository - quassel.git/atom - CMakeLists.txt history Quassel IRC https://git.quassel-irc.org/?p=quassel.git Quassel IRC static/git-favicon.png static/git-logo.png 2021-01-04T07:16:42Z gitweb cmake: Modernize (and fix) deployment on macOS 2021-01-03T13:48:36Z Manuel Nickschas sputnick@quassel-irc.org Manuel Nickschas sputnick@quassel-irc.org 2021-01-03T13:48:36Z https://git.quassel-irc.org/?p=quassel.git;a=commitdiff;h=082cb8c8eb6db90cbb2166a0098874e76d5c6ad9
cmake: Modernize (and fix) deployment on macOS

For the past decade or so, we have used a bunch of self-written python
and bash scripts for creating packages for macOS. These have not aged
well, and recently several workarounds had to be hacked in to keep
the machinery somewhat working at all. Still, invoking the scripts at
build time rather than install time caused a race condition where
sometimes not all the packages would be created in CI. To break the
camel's back, deploying dependencies no longer worked correctly and
broke the packages completely in 0.14-rc1.

Fix this by modernizing the whole deployment process and related
parts of the build system, replacing the custom scripts by relying
on Qt's and CMake's own tooling instead. Some workarounds still need
to be added to that to make everything work correctly (neither tool
can deal correctly with QtWebEngine, for some reason, and CMake's
Info.plist template lacks functionality), but the main part of the
work is now delegated to official tooling, everything properly
happend at install time avoiding race conditions in the build process,
and we can remove a bunch of decade-old and hardly maintained custom
code.

Also adapt the CI configuration to use -DBUNDLE instead of the
old -DDEPLOY, and remove the explicit setting of qmake's path too,
as it is no longer needed now.
  • [D] CMakeLists.txt
cmake: Determine minimum deployment target for Qt 2021-01-03T13:39:28Z Manuel Nickschas sputnick@quassel-irc.org Manuel Nickschas sputnick@quassel-irc.org 2021-01-03T13:39:28Z https://git.quassel-irc.org/?p=quassel.git;a=commitdiff;h=28eb43dd1ccd882b2975c346297842c1dc074469
cmake: Determine minimum deployment target for Qt

The minimum version of macOS supported by Qt may differ from the one
provided by the Xcode SDK in use. If started on a macOS that is older
than the minimum version indicated by Qt, the application might crash.

Qt's minimum deployment target is not available directly as a define,
variable or CMake/qmake property, but can be extracted from qmake
using a rather stupid hack. Use this to set a cache variable that
will be used in subsequent commits when generating the package's
Info.plist file.
  • [D] CMakeLists.txt
cmake: Allow deprecation warnings 2020-06-15T23:51:34Z Manuel Nickschas sputnick@quassel-irc.org Manuel Nickschas sputnick@quassel-irc.org 2020-06-15T23:51:34Z https://git.quassel-irc.org/?p=quassel.git;a=commitdiff;h=c9d498c1d165c23cb854a8fbe9482a9289029071
cmake: Allow deprecation warnings

In recent releases, Qt deprecated a whole bunch of APIs, probably
in preparation of the advent of Qt 6. Unfortunately, avoiding those
is not straightforward, since Quassel has to support a broad range
of older Qt releases, and not all deprecated APIs are easy to replace
in those older versions. Some APIs, such as bearer management, don't
even have a replacement yet.

Since Qt 5.13, deprecation warnings cannot be disabled at all. To
avoid breaking the CI builds, make deprecation warnings non-fatal
even if FATAL_WARNINGS is enabled. This allows us to remove the
WARN_QT_DEPRECATION option, which only had an effect when building
against Qt < 5.13 anyway, and unconditionally enable the warnings
when compiling with GCC or Clang.

For MSVC, disable deprecation warnings completely, since there
seems to be no way to selectively make warnings non-fatal, and we
still want to fail for anything other than deprecations.

Disable the use of APIs completely that were deprecated in Qt 5.5
(our current baseline) or earlier to prevent accidental use.
This threshold can be raised in the future as we can rely on newer
Qt versions and modernize affected code.
  • [D] CMakeLists.txt
ssl: Remove HAVE_SSL define 2020-03-15T17:59:20Z Manuel Nickschas sputnick@quassel-irc.org Manuel Nickschas sputnick@quassel-irc.org 2020-03-15T17:59:20Z https://git.quassel-irc.org/?p=quassel.git;a=commitdiff;h=1400ec302022bfaff36e0fd65951085db7ef28f2
ssl: Remove HAVE_SSL define

With fallback code for missing SSL support removed from the code base,
the HAVE_SSL define is no longer needed.
  • [D] CMakeLists.txt
ssl: Require SSL support in Qt 2020-03-15T17:55:01Z Manuel Nickschas sputnick@quassel-irc.org Manuel Nickschas sputnick@quassel-irc.org 2020-03-15T17:55:01Z https://git.quassel-irc.org/?p=quassel.git;a=commitdiff;h=df38a9238d603ec8d2040619befa50980d994916
ssl: Require SSL support in Qt

There is no sane reason for not using SSL in the year 2020, plus
every distro should be shipping the Qt libraries with SSL support
enabled. Thus, make it mandatory for Quassel, too.

Going forward, this allows us to remove lots of fallback code paths
that make the code much more complex in many places, and that have
not been tested (or even been built) in a long time.
  • [D] CMakeLists.txt
Remove debug console and QtScript, which was deprecated with Qt5 2019-08-04T20:46:26Z Janne Koschinski janne@kuschku.de Manuel Nickschas sputnick@quassel-irc.org 2019-08-04T20:46:26Z https://git.quassel-irc.org/?p=quassel.git;a=commitdiff;h=42d328e94a3bed8e6b0a32e7a234281e6d184325
Remove debug console and QtScript, which was deprecated with Qt5

- reduces dependencies, allows building quasselcore on most distros
  without pulling in X11
- removes unused code and dependencies, reduces size
  • [D] CMakeLists.txt
Add a flag to enable Qt deprecation warnings on Qt < 5.13 2019-08-05T10:44:27Z Janne Koschinski janne@kuschku.de Manuel Nickschas sputnick@quassel-irc.org 2019-08-05T10:44:27Z https://git.quassel-irc.org/?p=quassel.git;a=commitdiff;h=a8ab790b2218d6131f12b622b1373ba62958f3ef
Add a flag to enable Qt deprecation warnings on Qt < 5.13
  • [D] CMakeLists.txt
cmake: fix build on MSYS2 2019-06-01T09:48:02Z Rafael Kitover rkitover@gmail.com Manuel Nickschas sputnick@quassel-irc.org 2019-06-01T09:48:02Z https://git.quassel-irc.org/?p=quassel.git;a=commitdiff;h=f5e769ff450b592bc645473e11f9258aec241f0e
cmake: fix build on MSYS2

Some minor changes to allow building easily on MSYS2:

- don't check for snorenotify on MSYS2 because it segfaults on startup

- don't use -fstack-protector-strong (libssp) on MinGW because it
currently causes segfaults during static initialization

https://sourceforge.net/p/mingw-w64/bugs/755/

- use the `cat` command to read files when using the 'MSYS Makefiles'
generator, and not the cmd.exe `type` command

- update doc for the quassel_add_module function wrt. 7d0879ab

Tested to build correctly on MSYS2 with both the 'MSYS Makefiles'
generator and the Ninja generator using a native ninja.

Signed-off-by: Rafael Kitover <rkitover@gmail.com>
  • [D] CMakeLists.txt
cmake: Lower Boost dep version 1.56 -> 1.54 2019-01-24T09:29:59Z Rafael Kitover rkitover@gmail.com Manuel Nickschas sputnick@quassel-irc.org 2019-01-24T09:29:59Z https://git.quassel-irc.org/?p=quassel.git;a=commitdiff;h=3f71a843b5e84f05438bed8bdc331699f670755d
cmake: Lower Boost dep version 1.56 -> 1.54

Require Boost 1.54 instead of 1.56.

Tested to compile and work correctly on OpenSUSE Leap 42.3.

Fixes #1510.

Signed-off-by: Rafael Kitover <rkitover@gmail.com>
  • [D] CMakeLists.txt
cmake: Add ENABLE_SHARED option, default ON 2019-01-24T09:31:02Z Rafael Kitover rkitover@gmail.com Manuel Nickschas sputnick@quassel-irc.org 2019-01-24T09:31:02Z https://git.quassel-irc.org/?p=quassel.git;a=commitdiff;h=7d0879abdca1bf85435b82dcde44907995b1ab44
cmake: Add ENABLE_SHARED option, default ON

Add an ENABLE_SHARED option, defaults to ON, when set to OFF
quassel_add_module() will build modules as static (does not affect
platforms where modules would be built as static anyway.)

The option name ENABLE_SHARED is frequently used for this purpose in
cmake.

Signed-off-by: Rafael Kitover <rkitover@gmail.com>
  • [D] CMakeLists.txt
cmake: Create imported target for Boost, if it doesn't exist yet 2018-11-20T22:33:56Z Manuel Nickschas sputnick@quassel-irc.org Manuel Nickschas sputnick@quassel-irc.org 2018-11-20T22:33:56Z https://git.quassel-irc.org/?p=quassel.git;a=commitdiff;h=02f740a0fed75951f474fc94c23901505a031c5b
cmake: Create imported target for Boost, if it doesn't exist yet

Older versions of CMake's FindBoost.cmake don't create imported
targets for the library. Create it ourselves if necessary.
  • [D] CMakeLists.txt
cmake: Allow to make compile warnings fatal 2018-11-18T20:02:12Z Manuel Nickschas sputnick@quassel-irc.org Manuel Nickschas sputnick@quassel-irc.org 2018-11-18T20:02:12Z https://git.quassel-irc.org/?p=quassel.git;a=commitdiff;h=07c41b7cebcc87a313a5bfccd50a7949d126180a
cmake: Allow to make compile warnings fatal

Failing on any compile warning is very useful in CI builds,
so add an option for enabling this. The option defaults to OFF,
because we don't want to annoy users that don't want this.

Enable fatal warnings in Travis CI.
  • [D] CMakeLists.txt
cmake: Move version setup into a separate .cmake file 2018-11-16T22:09:50Z Manuel Nickschas sputnick@quassel-irc.org Manuel Nickschas sputnick@quassel-irc.org 2018-11-16T22:09:50Z https://git.quassel-irc.org/?p=quassel.git;a=commitdiff;h=0fcf6adf1ca3a256bd0e5c1db40507874b9d65a8
cmake: Move version setup into a separate .cmake file

Introduce a new QuasselVersion.cmake that contains the hard-coded
version, as well as the code for retrieving version information from
git (if available). This file also sets up version.h with the given
information. Remove the corresponding code from the main
CMakeLists.txt.

Output the git revision at configure time if available, which helps
when analyzing build logs.
  • [D] CMakeLists.txt
cmake: Consolidate compile settings 2018-11-15T21:41:26Z Manuel Nickschas sputnick@quassel-irc.org Manuel Nickschas sputnick@quassel-irc.org 2018-11-15T21:41:26Z https://git.quassel-irc.org/?p=quassel.git;a=commitdiff;h=d9c471f91a6c31863e9fe805a5575ec3a308e7bc
cmake: Consolidate compile settings

Consolidate the various places where we were setting compiler options
in QuasselCompileSettings.cmake. No longer include KDE's settings;
instead, take some inspiration from their setup and incorporate this
in our own, so we not only benefit when building against KDE
Frameworks.

Properly handle CMAKE_CXX_FLAGS and friends; append the flags to the
end of our own list of flags, so one can override what we define.
Clear the variables afterwards to avoid duplication.

Get rid of some MinGW options that have been around for a decade
and are most likely no longer required.
  • [D] CMakeLists.txt
cmake: Add build-time dependency to Boost 1.56 2018-09-24T19:55:42Z Manuel Nickschas sputnick@quassel-irc.org Manuel Nickschas sputnick@quassel-irc.org 2018-09-24T19:55:42Z https://git.quassel-irc.org/?p=quassel.git;a=commitdiff;h=30b159cb876a9495de42e9a3e70ca050516f0805
cmake: Add build-time dependency to Boost 1.56

We'll be using some Boost features in the future, so prepare the
build system to reflect that dependency.
  • [D] CMakeLists.txt
tests: Convert ExpressionMatchTests into a GTest-based test case 2018-09-24T18:42:51Z Manuel Nickschas sputnick@quassel-irc.org Manuel Nickschas sputnick@quassel-irc.org 2018-09-24T18:42:51Z https://git.quassel-irc.org/?p=quassel.git;a=commitdiff;h=ed5b2ff32158ae72c011eb1228f373cec05cbfeb
tests: Convert ExpressionMatchTests into a GTest-based test case

As first contender for the newly introduced test framework, use
the recently added ExpressionMatchTests class. Convert to use
GTest, and move into the new home for Quassel unit tests (the
tests/<module>/ directory).

With this, "make test" (or "ninja test") actually does something
if Quassel is configured with -DBUILD_TESTING=ON.
  • [D] CMakeLists.txt
test: Add build system support and a main function for unit tests 2018-09-24T18:36:21Z Manuel Nickschas sputnick@quassel-irc.org Manuel Nickschas sputnick@quassel-irc.org 2018-09-24T18:36:21Z https://git.quassel-irc.org/?p=quassel.git;a=commitdiff;h=8f2ee00f4edef1693628d3af0bdee84d725eb754
test: Add build system support and a main function for unit tests

Add a new CMake option BUILD_TESTING (defaults to OFF) that, if
enabled, will build unit tests and related requirements.

Add a new library Quassel::Test::Main that provides a main function
for test cases.

Add a new CMake macro quassel_add_test for making the adding of test
cases convenient by hiding most of the boilerplate.

Test cases should #include "testglobal.h", so they automatically have
access to GTest/GMock macros as well as the imported main function.
  • [D] CMakeLists.txt
cmake: Build shared libraries 2018-08-22T21:47:22Z Manuel Nickschas sputnick@quassel-irc.org Manuel Nickschas sputnick@quassel-irc.org 2018-08-22T21:47:22Z https://git.quassel-irc.org/?p=quassel.git;a=commitdiff;h=1e37a9de70d5ff524fe9d01e715f6dbcdfa9ba06
cmake: Build shared libraries

The days of static builds are finally over. Build dynamic libraries
for all Quassel modules.

Let CMake handle the RPATH in a way that doesn't cause inconvenience;
always set an RPATH in the build tree so the correct libraries
are loaded, and also set an RPATH for installed binaries unless
they go into a system location.

Also define output directories for all build artifacts.
  • [D] CMakeLists.txt
cmake: Modernize cmake support for LDAP 2018-08-08T20:22:39Z Manuel Nickschas sputnick@quassel-irc.org Manuel Nickschas sputnick@quassel-irc.org 2018-08-08T20:22:39Z https://git.quassel-irc.org/?p=quassel.git;a=commitdiff;h=bad087a1b604c92c7c0bf3cf818b81d26e15c1c4
cmake: Modernize cmake support for LDAP

Use a more modern, property-based find script for the LDAP libraries
and get rid of the deprecated use of LDAP_LIBRARIES and similar
variables in favor of a namespaced Ldap::Ldap target.
Set package properties for better diagnostic output at configure time.
  • [D] CMakeLists.txt
cmake: Reorganize package finding 2018-08-06T21:35:00Z Manuel Nickschas sputnick@quassel-irc.org Manuel Nickschas sputnick@quassel-irc.org 2018-08-06T21:35:00Z https://git.quassel-irc.org/?p=quassel.git;a=commitdiff;h=53f09c31bd4e59ffc1830660aebb221f52b06a6f
cmake: Reorganize package finding

Use COMPONENTS to find required Qt5 modules in one go.
Don't look for QtWebKit if we already have QtWebEngine.
Look for Sonnet explicitly even when using KDE Frameworks, because
we're using its config widget and shouldn't rely on transitivity
here.
Only look for LDAP when building the core (or mono client).
Add QUIET everywhere to avoid spammy CMake warnings for optional
packages.
Add some diagnostic output indicating the versions of Qt and KF5.
  • [D] CMakeLists.txt