Quassel IRC Repository - quassel.git/atom - src/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] src/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] src/CMakeLists.txt
cmake: Modernize build system 2018-08-02T21:16:22Z Manuel Nickschas sputnick@quassel-irc.org Manuel Nickschas sputnick@quassel-irc.org 2018-08-02T21:16:22Z https://git.quassel-irc.org/?p=quassel.git;a=commitdiff;h=4ce53949ab7d52a49ae79b8817bd3aa50fada0d1
cmake: Modernize build system

Move to the modern, property-based way of using CMake. This
simplifies a lot of things:
 - No need to manually specify interface include dirs and libraries
   of dependencies
 - No need to carry around variables
 - Clear separation of local and global dependencies and definitions
 - No need for hacks to make the triple-executable thing work

Provide convenience functions to set up library and executable
targets. This will make it very easy in the future to split up
some modules, as well as move towards using shared libraries.

Use the modern, property-based way of using Qt, too. This removes
the need for the deprecated qt5_use_modules() macro, and a bunch
of manual things we had to do to get the compile flags right
for the different Quassel executables.
Also make use of CMake's AUTOUIC and AUTORCC to avoid a bunch of
boilerplate for dealing with .ui files and Qt resources.

Move the .ui files from their subdirectory into the qtui directory,
since the separation doesn't really make too much sense. We'd rather
want to split the QtUi module into smaller parts/libraries.

Remove a bunch of unnecessary stuff from the CMake files.
  • [D] src/CMakeLists.txt
cmake: Remove support for building static binaries 2018-07-31T21:14:16Z Manuel Nickschas sputnick@quassel-irc.org Manuel Nickschas sputnick@quassel-irc.org 2018-07-31T21:14:16Z https://git.quassel-irc.org/?p=quassel.git;a=commitdiff;h=af9bfa0581dd3620f6fe300084262c55c7084046
cmake: Remove support for building static binaries

Building and running static binaries has become increasingly
difficult on modern systems, in particular when involving
complex libraries like Qt due to their reliance on plugins and
other dynamically loaded resources. It is also a security risk,
as upgrades to system libraries won't apply to the static binary.

Having a static quasselcore binary was quite useful when it was
hard to get Qt on an X11-less box, but these days all major distros
support modular Qt, and can provide Quasselcore packages that
don't require graphical dependencies. Consequently, we no longer
intend to offer static binaries.

Thus, remove the corresponding hacks from the build system.
  • [D] src/CMakeLists.txt
cmake: Remove build system support for Qt4/KDE4 2018-07-16T22:11:57Z Manuel Nickschas sputnick@quassel-irc.org Manuel Nickschas sputnick@quassel-irc.org 2018-07-16T22:11:57Z https://git.quassel-irc.org/?p=quassel.git;a=commitdiff;h=0216d4a650c02155b5bcd517567209f674d8a120
cmake: Remove build system support for Qt4/KDE4

In our quest to modernize the codebase, remove support for the
long-dead Qt4 libraries (and consequently, also for integration
into KDE4) from the build system.
  • [D] src/CMakeLists.txt
Set RUNTIME_OUTPUT_DIRECTORY instead of abusing OUTPUT_NAME 2018-08-11T19:06:00Z Mike Gilbert floppym@gentoo.org Manuel Nickschas sputnick@quassel-irc.org 2018-08-11T19:06:00Z https://git.quassel-irc.org/?p=quassel.git;a=commitdiff;h=c698d8f7b820ff82546d2435624d9eef414b156b
Set RUNTIME_OUTPUT_DIRECTORY instead of abusing OUTPUT_NAME

This resolves an error when building with ninja:

ninja: error: build.ninja:4374: multiple rules generate quasselcore
  • [D] src/CMakeLists.txt
Adapt macosx_makePackage.sh for svg icon support 2016-07-16T13:02:12Z romibi romibi@bluewin.ch Manuel Nickschas sputnick@quassel-irc.org 2016-07-16T13:02:12Z https://git.quassel-irc.org/?p=quassel.git;a=commitdiff;h=7d73788c24bd88e3ace7fc44444c3a02fc736579
Adapt macosx_makePackage.sh for svg icon support

Resolves GH-234.
  • [D] src/CMakeLists.txt
Add and Initialize Icon Themes 2016-07-15T19:35:44Z romibi romibi@bluewin.ch Manuel Nickschas sputnick@quassel-irc.org 2016-07-15T19:35:44Z https://git.quassel-irc.org/?p=quassel.git;a=commitdiff;h=11a1e4372551439769eafba3f3f5403adff763fb
Add and Initialize Icon Themes
  • [D] src/CMakeLists.txt
Fix Mac Deploy scripts for newer Xcode and git 2016-07-05T19:39:39Z romibi romibi@bluewin.ch Manuel Nickschas sputnick@quassel-irc.org 2016-07-05T19:39:39Z https://git.quassel-irc.org/?p=quassel.git;a=commitdiff;h=236ad337e4f2bb4227547efe590942fe2b6c6052
Fix Mac Deploy scripts for newer Xcode and git

Resolves GH-229.
  • [D] src/CMakeLists.txt
Remove arguments of CMake's else() and endif() commands 2016-07-01T16:50:36Z Rolf Eike Beer kde@opensource.sf-tec.de Manuel Nickschas sputnick@quassel-irc.org 2016-07-01T16:50:36Z https://git.quassel-irc.org/?p=quassel.git;a=commitdiff;h=622ae84876eaab27ab232ee72e97e090b0aa57c0
Remove arguments of CMake's else() and endif() commands

The need for them is long gone, but they are still permitted. Remove the
remaining instances to make the code more consistent.
  • [D] src/CMakeLists.txt
Simplify the handling of the contributor list in AboutDlg 2015-02-04T23:20:06Z Manuel Nickschas sputnick@quassel-irc.org Manuel Nickschas sputnick@quassel-irc.org 2015-02-04T23:20:06Z https://git.quassel-irc.org/?p=quassel.git;a=commitdiff;h=ef13687df76b292f36f330bed44cf9f35ac53632
Simplify the handling of the contributor list in AboutDlg

This introduces an AboutData class akin to KAboutData from KDE
Frameworks. Together with brace initialization, which we can now
use thanks to C++11, this makes specifying the (huge!) list of
contributors to Quassel much nicer, compared to editing a long
HTML string.

AboutData also can create a KAboutData object that can be used for
KF5 integration, and later for showing the native KAboutDialog
instead of our own if KDE integration is enabled.

The list of contributors has also been synced with the Git history
again. If you find your name missing, or want changes, please
let us know.
  • [D] src/CMakeLists.txt
Prepare build system for KDE Frameworks support 2015-01-02T21:08:12Z Manuel Nickschas sputnick@quassel-irc.org Manuel Nickschas sputnick@quassel-irc.org 2015-01-02T21:08:12Z https://git.quassel-irc.org/?p=quassel.git;a=commitdiff;h=d68e9d67200abc51123b357bcdbbc816d4a70791
Prepare build system for KDE Frameworks support

Besides setting everything up for finding frameworks, this commit also
changes the handling of install paths. We now support the standard CMake
variables of the form CMAKE_INSTALL_<TYPE>_DIR, which can be overridden
on the command line. If KDE integration is enabled, the default paths set
by KDE (4 or frameworks) will be used.

Some additional cleanups were done in passing, too.
  • [D] src/CMakeLists.txt
Build mono client packages on Mac OS X 2014-04-09T12:58:49Z Marcus Eggenberger egs@quassel-irc.org Marcus Eggenberger egs@quassel-irc.org 2014-04-09T12:58:49Z https://git.quassel-irc.org/?p=quassel.git;a=commitdiff;h=f6cc3c4c662771d76355f876dd6e0317b890676b
Build mono client packages on Mac OS X

When deploying on Mac OS X, also build a disk image (dmg) for the mono
client. Also updated cmake files for OS X 10.8.
  • [D] src/CMakeLists.txt
Make --syslog option work again 2014-03-31T20:12:28Z Manuel Nickschas sputnick@quassel-irc.org Manuel Nickschas sputnick@quassel-irc.org 2014-03-31T20:12:28Z https://git.quassel-irc.org/?p=quassel.git;a=commitdiff;h=b6cb2c68d2a39f2a2d08cacf4fe7373e27a649e9
Make --syslog option work again

The -DHAVE_SYSLOG was missing for compiling main() after the recent
build system changes, so the option wasn't enabled (but caused a
warning).
  • [D] src/CMakeLists.txt
Bring back COMMON_DEPS 2014-03-31T20:03:54Z Manuel Nickschas sputnick@quassel-irc.org Manuel Nickschas sputnick@quassel-irc.org 2014-03-31T20:03:54Z https://git.quassel-irc.org/?p=quassel.git;a=commitdiff;h=76292839bd070d54b4a95a13381dbce45b7cda26
Bring back COMMON_DEPS

This is actually being used to link the app icon on Windows, so bring
the old variables back for now. Probably want to clean this up later
though, as the naming is confusing.
  • [D] src/CMakeLists.txt
Fix Qt resource handling 2014-03-31T19:58:27Z Manuel Nickschas sputnick@quassel-irc.org Manuel Nickschas sputnick@quassel-irc.org 2014-03-31T19:58:27Z https://git.quassel-irc.org/?p=quassel.git;a=commitdiff;h=c3c6809d89bd860cb74c7cc1336f190cfe97a3b9
Fix Qt resource handling

Turns out we have to explicitly initialize Qt resources that are linked
statically, so our last build system change broke things because the
files where nowhere to be found.

This now initializes the resources in main(); additionally, we use absolute
paths for the qrc files now, simply for making things a bit clearer.
  • [D] src/CMakeLists.txt
Avoid race conditions in the build system 2014-03-28T23:57:22Z Manuel Nickschas sputnick@quassel-irc.org Manuel Nickschas sputnick@quassel-irc.org 2014-03-28T23:57:22Z https://git.quassel-irc.org/?p=quassel.git;a=commitdiff;h=9e21879f361dfe9978fb5159664cae352301064b
Avoid race conditions in the build system

Adding resource files in multiple targets is a bad idea, because CMake
will happily generate them multiple times too, and unfortunately also
in the same location. With Qt5, this actually lead to a misgenerated
oxygen_kde.qrc some times.

Now we add the resources in the module they belong to, which not only
avoids these race conditions, but also saves some time during compile,
because every resource file is only processed once now.

Changing this triggered yet another race condition, where not all translations
would be generated by the time the corresponding .qrc was needed. Adding
a fugly add_dependencies(mod_common po) fixes this; however we may want to
find a cleaner way to properly express deps between the language files and the
qrc.
  • [D] src/CMakeLists.txt
Fix handling the QtMain module on Windows 2014-03-23T22:33:00Z Manuel Nickschas sputnick@quassel-irc.org Manuel Nickschas sputnick@quassel-irc.org 2014-03-23T22:33:00Z https://git.quassel-irc.org/?p=quassel.git;a=commitdiff;h=eff78b001a8e16181933de143e3cf3f829684f83
Fix handling the QtMain module on Windows

Turns out that the QtMain module can't be used in qt4_use_modules,
and we should just add the library to our targets.
  • [D] src/CMakeLists.txt
Completely rework the dependency handling in the build system 2014-03-23T01:39:38Z Manuel Nickschas sputnick@quassel-irc.org Manuel Nickschas sputnick@quassel-irc.org 2014-03-23T01:39:38Z https://git.quassel-irc.org/?p=quassel.git;a=commitdiff;h=2273a95ba9c277ce6dd7a67158a3d3ed9f161182
Completely rework the dependency handling in the build system

Traditionally, optional build dependencies are handled in CMake via
offering options and conditionally searching for the needed packages.
This leads to having lots of options, boilerplate for telling the user
which features are enabled or not, unclear handling of automagic
dependencies, and so on.

These days, CMake offers a much nicer way: feature_summary() and friends.
To make use of this, one calls find_package unconditionally and then sets
properties on the package that tell CMake if the dependency is optional
or required, its purpose, a description of the package etc. At the end
of configuration, CMake then displays a nice summary of all the packages
searched for and (not) found, as well as other features.

Quassel now makes use of this modern way of specifying dependencies, replacing
most of the former options (they're still there, but unused now, and will
be removed soon). Note that one can still disable an optional dependency Foo by
passing -DCMAKE_DISABLE_FIND_PACKAGE_Foo=TRUE to CMake.

I also took the opportunity to radically clean up and fix how we handle
dependencies throughout the build system:

* We no longer set an extra CMake variable to indicate that a package was
  found, but use the Foo_FOUND variable directly
* Compile definitions and include directories are no longer set globally
  in the root CMakeLists.txt, but in the Quassel modules where they're
  actually needed; this should speed up compiling ever so slightly and
  generally make things much cleaner
* Libraries are now linked directly to the Quassel modules that use them,
  rather than to the executable. This prepares us for making the modules
  shared libraries at some point, and is anyway The Right Thing™ to do
* Fully support Qt5 in the build system, including finding the proper version
  of dependencies where appropriate and available

Note that the changes to the build system are not complete yet, and some things
may be broken now. Note also that while Qt5 is now supported in the build system,
the code itself still requires many changes to actually compile with Qt5,
so don't even try.
  • [D] src/CMakeLists.txt
Improve the CMake option stuff 2014-03-20T21:29:42Z Manuel Nickschas sputnick@quassel-irc.org Manuel Nickschas sputnick@quassel-irc.org 2014-03-20T21:29:42Z https://git.quassel-irc.org/?p=quassel.git;a=commitdiff;h=3d3a6b8d34b9d0ab3a2502936c49c0d0d5e91617
Improve the CMake option stuff

We now use cmake_dependent_option() to express dependencies between
the various options that you can give to CMake for configuring Quassel;
for example, enabling KDE4 now forces some options to OFF regardless
of the user-selected value (which will, however, be preserved in case
KDE integration is disabled again later).

This also renames WITH_QT5 to USE_QT5 (and adds a USE_QT4, too); this seems
to have emerged as the standard way to select a Qt version for dual-Qt
packages. However, Qt4 is still selected by default unless you force Qt5
by setting the USE_QT5 flag. BTW, don't get your hopes up, Qt5 support is
still broken... Once it's working, we may select Qt5 as default for certain
platforms.

Additionally we renamed QT to QT_PATH to make the function of this flag
more clear.
  • [D] src/CMakeLists.txt