diff --git a/CMakeLists.txt b/CMakeLists.txt index 3a71c4a885..0c130df139 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -324,6 +324,7 @@ kf5_add_kdeinit_executable( kwin ${kwin_KDEINIT_SRCS}) target_link_libraries(kdeinit_kwin ${kwinLibs}) set_target_properties(kwin PROPERTIES OUTPUT_NAME ${KWIN_NAME}) set_target_properties(kdeinit_kwin PROPERTIES OUTPUT_NAME kdeinit4_${KWIN_NAME}) +generate_export_header(kdeinit_kwin EXPORT_FILE_NAME kwin_export.h) if(KWIN_BUILD_OPENGL) if( KWIN_BUILD_OPENGL_1_COMPOSITING ) @@ -348,6 +349,7 @@ install(TARGETS kwin ${INSTALL_TARGETS_DEFAULT_ARGS} ) install( FILES kwin.kcfg DESTINATION ${KCFG_INSTALL_DIR} RENAME ${KWIN_NAME}.kcfg ) install( FILES kwin.notifyrc DESTINATION ${DATA_INSTALL_DIR}/${KWIN_NAME} RENAME ${KWIN_NAME}.notifyrc) install( FILES org.kde.KWin.xml DESTINATION ${DBUS_INTERFACES_INSTALL_DIR} ) +install( FILES ${CMAKE_CURRENT_BINARY_DIR}/kwin_export.h DESTINATION ${INCLUDE_INSTALL_DIR} COMPONENT Devel) if( KWIN_BUILD_SCRIPTING ) # Install the KWin/WindowSwitcher service type diff --git a/kcmkwin/kwinrules/main.cpp b/kcmkwin/kwinrules/main.cpp index c36dc236b6..678e25a76e 100644 --- a/kcmkwin/kwinrules/main.cpp +++ b/kcmkwin/kwinrules/main.cpp @@ -239,7 +239,7 @@ static int edit(Window wid, bool whole_app) } // namespace extern "C" -KDE_EXPORT int kdemain(int argc, char* argv[]) +KWIN_EXPORT int kdemain(int argc, char* argv[]) { QApplication app(argc, argv); app.setApplicationDisplayName(i18n("KWin")); diff --git a/libkwineffects/kwinglobals.h b/libkwineffects/kwinglobals.h index 01c69c52f7..ab7196c388 100644 --- a/libkwineffects/kwinglobals.h +++ b/libkwineffects/kwinglobals.h @@ -23,14 +23,14 @@ along with this program. If not, see . #include -#include +#include #include #include -#define KWIN_EXPORT KDE_EXPORT #define KWIN_QT5_PORTING 0 +#define KWIN_EXPORT KDEINIT_KWIN_EXPORT namespace KWin { diff --git a/main.cpp b/main.cpp index 6629db940c..9be12fa874 100644 --- a/main.cpp +++ b/main.cpp @@ -376,7 +376,7 @@ static const char version[] = KWIN_VERSION_STRING; static const char description[] = I18N_NOOP("KDE window manager"); extern "C" -KDE_EXPORT int kdemain(int argc, char * argv[]) +KWIN_EXPORT int kdemain(int argc, char * argv[]) { #ifdef M_TRIM_THRESHOLD // Prevent fragmentation of the heap by malloc (glibc).