cmake: Support generation of export headers
authorManuel Nickschas <sputnick@quassel-irc.org>
Sun, 2 Sep 2018 21:06:18 +0000 (23:06 +0200)
committerManuel Nickschas <sputnick@quassel-irc.org>
Sun, 18 Nov 2018 10:06:43 +0000 (11:06 +0100)
For using shared libraries without globally exporting all symbols,
one has to explicitly mark classes and free functions to be exported.
This is more efficient on platforms like Linux (enabling the use
of -fvisibility=hidden on GCC/Clang), and a hard requirement for
using DLLs on Windows (which don't support global export at all).

Extend the quassel_add_module() macro with an optional EXPORT
argument, which, if provided, uses CMake's built-in support for
generating an export header that provides macros for exporting
symbols. The same macro will also import the marked symbols when
building against a library.

While we're at it, also fix the install rule to use the proper
install locations for RUNTIME/LIBRARY/ARCHIVE target types.


No differences found