From 199ed87c61273a685d6e1f3e4824fda7a6929b2d Mon Sep 17 00:00:00 2001 From: Jacob Logan Date: Wed, 4 Dec 2013 20:31:52 +1100 Subject: [PATCH] [libkdecorations] Generate an export header REVIEW: 114247 --- CMakeLists.txt | 1 + clients/aurorae/src/aurorae.cpp | 4 ++-- libkdecorations/CMakeLists.txt | 3 ++- libkdecorations/kcommondecoration.h | 5 +++-- libkdecorations/kdecoration.h | 12 ++++++------ libkdecorations/kdecoration_plugins_p.h | 3 ++- libkdecorations/kdecorationfactory.h | 3 ++- 7 files changed, 18 insertions(+), 13 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index 9157fe910a..3a71c4a885 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -78,6 +78,7 @@ configure_file(config-kwin.h.cmake ${CMAKE_CURRENT_BINARY_DIR}/config-kwin.h ) ########### global ############### include_directories(BEFORE + ${CMAKE_CURRENT_BINARY_DIR}/libkdecorations ${CMAKE_CURRENT_BINARY_DIR}/libkwineffects ${CMAKE_CURRENT_BINARY_DIR} ${CMAKE_CURRENT_SOURCE_DIR}/libkwineffects diff --git a/clients/aurorae/src/aurorae.cpp b/clients/aurorae/src/aurorae.cpp index f01cca082f..76ec176bbc 100644 --- a/clients/aurorae/src/aurorae.cpp +++ b/clients/aurorae/src/aurorae.cpp @@ -564,10 +564,10 @@ void AuroraeClient::render(QPaintDevice *device, const QRegion &sourceRegion) extern "C" { - KDE_EXPORT KDecorationFactory *create_factory() { + KDECORATIONS_EXPORT KDecorationFactory *create_factory() { return Aurorae::AuroraeFactory::instance(); } - KWIN_EXPORT int decoration_version() { + KDECORATIONS_EXPORT int decoration_version() { return KWIN_DECORATION_API_VERSION; } } diff --git a/libkdecorations/CMakeLists.txt b/libkdecorations/CMakeLists.txt index 7015e5e96a..61ea2d0f71 100644 --- a/libkdecorations/CMakeLists.txt +++ b/libkdecorations/CMakeLists.txt @@ -8,7 +8,7 @@ set(kdecorations_LIB_SRCS kcommondecoration_p.cpp ) add_library(kdecorations SHARED ${kdecorations_LIB_SRCS}) - +generate_export_header(kdecorations EXPORT_FILE_NAME kdecorations_export.h) target_link_libraries(kdecorations Qt5::Widgets Qt5::X11Extras @@ -30,4 +30,5 @@ install( FILES kdecoration.h kdecorationfactory.h kcommondecoration.h + ${CMAKE_CURRENT_BINARY_DIR}/kdecorations_export.h DESTINATION ${INCLUDE_INSTALL_DIR} COMPONENT Devel ) diff --git a/libkdecorations/kcommondecoration.h b/libkdecorations/kcommondecoration.h index 7c1536e173..57a42ecdd8 100644 --- a/libkdecorations/kcommondecoration.h +++ b/libkdecorations/kcommondecoration.h @@ -27,6 +27,7 @@ #include #include "kdecoration.h" +#include /** @addtogroup kdecoration */ /** @{ */ @@ -65,7 +66,7 @@ class KCommonDecorationWrapper; * use the decoration() function. * See KDecoration documentation for all the wrapped functions. */ -class KWIN_EXPORT KCommonDecoration : public QObject, public KDecorationDefines +class KDECORATIONS_EXPORT KCommonDecoration : public QObject, public KDecorationDefines { Q_OBJECT @@ -424,7 +425,7 @@ private: /** * Title bar buttons of KCommonDecoration need to inherit this class. */ -class KWIN_EXPORT KCommonDecorationButton : public QAbstractButton +class KDECORATIONS_EXPORT KCommonDecorationButton : public QAbstractButton { Q_OBJECT diff --git a/libkdecorations/kdecoration.h b/libkdecorations/kdecoration.h index 78624aa67e..99ece35033 100644 --- a/libkdecorations/kdecoration.h +++ b/libkdecorations/kdecoration.h @@ -25,7 +25,7 @@ DEALINGS IN THE SOFTWARE. #ifndef KDECORATION_H #define KDECORATION_H -#include +#include #include #include @@ -43,8 +43,8 @@ DEALINGS IN THE SOFTWARE. **/ #define KWIN_DECORATION( classname ) \ extern "C" { \ - KWIN_EXPORT KDecorationFactory* create_factory() { return new classname(); } \ - KWIN_EXPORT int decoration_version() { return KWIN_DECORATION_API_VERSION; } \ + KDECORATIONS_EXPORT KDecorationFactory* create_factory() { return new classname(); } \ + KDECORATIONS_EXPORT int decoration_version() { return KWIN_DECORATION_API_VERSION; } \ } #define KWIN_DECORATION_BRIDGE_API_VERSION 1 @@ -69,7 +69,7 @@ class KDecorationFactory; * This class provides a namespace for all decoration related classes. * All shared types are defined here. */ -class KWIN_EXPORT KDecorationDefines +class KDECORATIONS_EXPORT KDecorationDefines { public: /** @@ -285,7 +285,7 @@ public: * It is accessible from the decorations either as KDecoration::options() * or KDecorationFactory::options(). */ -class KWIN_EXPORT KDecorationOptions : public QObject, public KDecorationDefines +class KDECORATIONS_EXPORT KDecorationOptions : public QObject, public KDecorationDefines { Q_OBJECT public: @@ -520,7 +520,7 @@ private: * provides pure virtual functions for controlling the decoration that * every decoration should implement. */ -class KWIN_EXPORT KDecoration +class KDECORATIONS_EXPORT KDecoration : public QObject, public KDecorationDefines { Q_OBJECT diff --git a/libkdecorations/kdecoration_plugins_p.h b/libkdecorations/kdecoration_plugins_p.h index 95b31b9430..bf36fc4860 100644 --- a/libkdecorations/kdecoration_plugins_p.h +++ b/libkdecorations/kdecoration_plugins_p.h @@ -36,13 +36,14 @@ DEALINGS IN THE SOFTWARE. #include #include "kdecoration.h" +#include class KLibrary; class KDecoration; class KDecorationBridge; class KDecorationFactory; -class KWIN_EXPORT KDecorationPlugins +class KDECORATIONS_EXPORT KDecorationPlugins : public KDecorationProvides { public: diff --git a/libkdecorations/kdecorationfactory.h b/libkdecorations/kdecorationfactory.h index 129bd67c45..f189dad70f 100644 --- a/libkdecorations/kdecorationfactory.h +++ b/libkdecorations/kdecorationfactory.h @@ -26,6 +26,7 @@ DEALINGS IN THE SOFTWARE. #define KDECORATIONFACTORY_H #include "kdecoration.h" +#include /** @addtogroup kdecoration */ /** @{ */ @@ -34,7 +35,7 @@ class KDecoration; class KDecorationBridge; class KDecorationFactoryPrivate; -class KWIN_EXPORT KDecorationFactory +class KDECORATIONS_EXPORT KDecorationFactory : public QObject, public KDecorationDefines { Q_OBJECT