OSDN Git Service

generic: generate export headers
authorIvailo Monev <xakepa10@gmail.com>
Wed, 28 Jul 2021 10:14:25 +0000 (13:14 +0300)
committerIvailo Monev <xakepa10@gmail.com>
Wed, 28 Jul 2021 11:58:10 +0000 (14:58 +0300)
Signed-off-by: Ivailo Monev <xakepa10@gmail.com>
70 files changed:
akregator/interfaces/akregator_export.h
ark/CMakeLists.txt
ark/kerfuffle/CMakeLists.txt
ark/kerfuffle/archiveinterface.h
ark/kerfuffle/kerfuffle_export.h [deleted file]
bluedevil/CMakeLists.txt
bluedevil/libbluedevil/bluedevil/CMakeLists.txt
bluedevil/libbluedevil/bluedevil/bluedevil_export.h [deleted file]
gwenview/CMakeLists.txt
gwenview/lib/CMakeLists.txt
gwenview/lib/gwenviewlib_export.h [deleted file]
kdeplasma-addons/applets/weather/CMakeLists.txt
kdeplasma-addons/applets/weatherstation/CMakeLists.txt
kdeplasma-addons/containments/groupingdesktop/CMakeLists.txt
kdeplasma-addons/containments/groupingdesktop/lib/CMakeLists.txt
kdeplasma-addons/containments/groupingdesktop/lib/abstractgroup.h
kdeplasma-addons/containments/groupingdesktop/lib/groupingcontainment.h
kdeplasma-addons/containments/groupingdesktop/lib/groupingcontainment_export.h [deleted file]
kdeplasma-addons/dataengines/potd/CMakeLists.txt
kdeplasma-addons/dataengines/potd/plasma_potd_export.h [deleted file]
kdeplasma-addons/libs/plasmaweather/CMakeLists.txt
kdeplasma-addons/libs/plasmaweather/plasmaweather_export.h [deleted file]
kdeplasma-addons/wallpapers/weather/CMakeLists.txt
kget/kget_export.h
kompare/CMakeLists.txt
kompare/interfaces/kompareinterfaceexport.h [deleted file]
kompare/komparenavtreepart/CMakeLists.txt
kompare/komparepart/CMakeLists.txt
kompare/libdialogpages/CMakeLists.txt
kompare/libdialogpages/dialogpagesexport.h [deleted file]
kompare/libdialogpages/diffpage.h
kompare/libdialogpages/filespage.h
kompare/libdialogpages/filessettings.h
kompare/libdialogpages/viewpage.h
kompare/libdialogpages/viewsettings.h
kompare/libkomparediff2/CMakeLists.txt
kompare/libkomparediff2/diff2export.h [deleted file]
kompare/libkomparediff2/difference.h
kompare/libkomparediff2/diffmodel.h
kompare/libkomparediff2/diffmodellist.h
kompare/libkomparediff2/diffsettings.h
kompare/libkomparediff2/kompare.h
kompare/libkomparediff2/komparemodellist.h
kompare/libkomparediff2/marker.h
kompare/libkomparediff2/settingsbase.h
kompare/libkomparediff2/tests/CMakeLists.txt
krdc/core/CMakeLists.txt
krdc/core/krdc_export.h [deleted file]
krdc/core/remoteview.h
libksane/libksane/CMakeLists.txt
libksane/libksane/ksane.h
libksane/libksane/libksane_export.h [deleted file]
libktorrent/src/ktorrent_export.h
okular/CMakeLists.txt
okular/conf/settings.kcfgc
okular/conf/settings_core.kcfgc
okular/core/okular_export.h [deleted file]
okular/core/textdocumentgenerator.h
okular/generators/dvi/kviewshell_export.h [deleted file]
okular/generators/dvi/pageSize.h
okular/generators/dvi/simplePageSize.h
okular/interfaces/configinterface.h
okular/interfaces/guiinterface.h
okular/interfaces/printinterface.h
okular/interfaces/saveinterface.h
okular/interfaces/viewerinterface.h
okular/okular_part_export.h [deleted file]
okular/part.h
okular/ui/toc.h
skanlite/src/CMakeLists.txt

index 3697f2d..3406038 100644 (file)
 #include <kdemacros.h>
 
 #ifndef AKREGATOR_EXPORT
-# if defined(KDEPIM_STATIC_LIBS)
-   /* No export/import for static libraries */
-#  define AKREGATOR_EXPORT
-# elif defined(MAKE_AKREGATORINTERFACES_LIB) || defined(MAKE_AKREGATORPRIVATE_LIB)
+# if defined(akregatorinterfaces_EXPORTS) || defined(akregatorprivate_EXPORTS)
    /* We are building this library */ 
 #  define AKREGATOR_EXPORT KDE_EXPORT
 # else
 #endif
 
 #ifndef AKREGATORPART_EXPORT
-# if defined(KDEPIM_STATIC_LIBS)
-   /* No export/import for static libraries */
-#  define AKREGATORPART_EXPORT
-# elif defined(MAKE_AKREGATORPART_LIB)
+# if defined(akregatorpart_EXPORTS)
    /* We are building this library */ 
 #  define AKREGATORPART_EXPORT KDE_EXPORT
 # else
 #endif
 
 #ifndef AKREGATORINTERFACES_EXPORT
-# if defined(KDEPIM_STATIC_LIBS)
-   /* No export/import for static libraries */
-#  define AKREGATORINTERFACES_EXPORT
-# elif defined(MAKE_AKREGATORINTERFACES_LIB)
+# if defined(akregatorinterfaces_EXPORTS)
    /* We are building this library */
 #  define AKREGATORINTERFACES_EXPORT KDE_EXPORT
 # else
index 7fdceed..3e94d9d 100644 (file)
@@ -48,6 +48,11 @@ include_directories(${PROJECT_SOURCE_DIR} ${PROJECT_BINARY_DIR})
 
 set(SUPPORTED_ARK_MIMETYPES "")
 
+include_directories(
+    # for kerfuffle_export.h
+    ${CMAKE_CURRENT_BINARY_DIR}/kerfuffle
+)
+
 add_subdirectory(plugins)
 add_subdirectory(kerfuffle)
 add_subdirectory(part)
index 11cab44..60341cf 100644 (file)
@@ -23,7 +23,12 @@ target_link_libraries(kerfuffle
     ${KDE4_KPTY_LIBS}
 )
 
-set_target_properties(kerfuffle PROPERTIES VERSION ${GENERIC_LIB_VERSION} SOVERSION ${GENERIC_LIB_SOVERSION})
+set_target_properties(kerfuffle PROPERTIES
+    VERSION ${GENERIC_LIB_VERSION}
+    SOVERSION ${GENERIC_LIB_SOVERSION}
+)
+
+generate_export_header(kerfuffle)
 
 install(TARGETS kerfuffle ${INSTALL_TARGETS_DEFAULT_ARGS})
 
index b2b5629..d878caa 100644 (file)
@@ -34,7 +34,9 @@
 #include <QObject>
 #include <QStringList>
 #include <QString>
-#include <QtCore/qvariant.h>
+#include <QVariant>
+#include <kdemacros.h>
+#include <kpluginfactory.h>
 
 namespace Kerfuffle
 {
@@ -135,4 +137,8 @@ public:
 
 } // namespace Kerfuffle
 
+#define KERFUFFLE_EXPORT_PLUGIN(p) \
+    K_PLUGIN_FACTORY( ArkPluginFactory, registerPlugin< p >(); ) \
+    K_EXPORT_PLUGIN( ArkPluginFactory("p") )
+
 #endif // ARCHIVEINTERFACE_H
diff --git a/ark/kerfuffle/kerfuffle_export.h b/ark/kerfuffle/kerfuffle_export.h
deleted file mode 100644 (file)
index f25c757..0000000
+++ /dev/null
@@ -1,53 +0,0 @@
-/*
- * This file is part of the KDE project
- *
- * Copyright (C) 2007 David Faure <faure@kde.org>
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- *
- * 1. Redistributions of source code must retain the above copyright
- *    notice, this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright
- *    notice, this list of conditions and the following disclaimer in the
- *    documentation and/or other materials provided with the distribution.
- *
- * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR
- * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
- * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
- * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT,
- * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES ( INCLUDING, BUT
- * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
- * DATA, OR PROFITS; OR BUSINESS INTERRUPTION ) HOWEVER CAUSED AND ON ANY
- * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
- * ( INCLUDING NEGLIGENCE OR OTHERWISE ) ARISING IN ANY WAY OUT OF THE USE OF
- * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
- */
-
-#ifndef KERFUFFLE_EXPORT_H
-#define KERFUFFLE_EXPORT_H
-
-/* needed for KDE_EXPORT and KDE_IMPORT macros */
-#include <kdemacros.h>
-#include <kpluginfactory.h>
-
-#ifndef KERFUFFLE_EXPORT
-# if defined(MAKE_KERFUFFLE_LIB)
-/* We are building this library */
-#  define KERFUFFLE_EXPORT KDE_EXPORT
-# else
-/* We are using this library */
-#  define KERFUFFLE_EXPORT KDE_IMPORT
-# endif
-#endif
-
-# ifndef KERFUFFLE_EXPORT_DEPRECATED
-#  define KERFUFFLE_EXPORT_DEPRECATED KDE_DEPRECATED KERFUFFLE_EXPORT
-# endif
-
-#define KERFUFFLE_EXPORT_PLUGIN(p) \
-    K_PLUGIN_FACTORY( ArkPluginFactory, registerPlugin< p >(); ) \
-    K_EXPORT_PLUGIN( ArkPluginFactory("p") )
-
-#endif
index ed4b64b..2fc1ace 100644 (file)
@@ -16,7 +16,11 @@ configure_file(version.h.cmake ${CMAKE_CURRENT_BINARY_DIR}/version.h)
 
 find_package(SharedMimeInfo REQUIRED)
 
-include_directories(${CMAKE_CURRENT_BINARY_DIR} libbluedevil)
+include_directories(
+    ${CMAKE_CURRENT_BINARY_DIR}
+    ${CMAKE_CURRENT_BINARY_DIR}/libbluedevil
+    ${CMAKE_CURRENT_SOURCE_DIR}/libbluedevil
+)
 
 add_subdirectory(src)
 
index 9d6999c..d2a4441 100644 (file)
@@ -31,16 +31,20 @@ set_target_properties(bluedevil PROPERTIES
    SOVERSION ${GENERIC_LIB_SOVERSION}
 )
 
+generate_export_header(bluedevil)
+
 install(TARGETS bluedevil ${INSTALL_TARGETS_DEFAULT_ARGS})
 
-install(FILES bluedevilmanager.h
-              bluedeviladapter.h
-              bluedevildevice.h
-              bluedevil_export.h
-              bluedevil.h
-              bluedevilutils.h DESTINATION include/bluedevil)
-
-if(NOT WIN32) # pkgconfig file
-   configure_file(${CMAKE_CURRENT_SOURCE_DIR}/bluedevil.pc.in ${CMAKE_CURRENT_BINARY_DIR}/bluedevil.pc @ONLY)
-   install(FILES ${CMAKE_CURRENT_BINARY_DIR}/bluedevil.pc DESTINATION ${KDE4_LIB_INSTALL_DIR}/pkgconfig)
-endif(NOT WIN32)
+install(
+    FILES
+    bluedevilmanager.h
+    bluedeviladapter.h
+    bluedevildevice.h
+    bluedevil.h
+    bluedevilutils.h
+    ${CMAKE_CURRENT_BINARY_DIR}/bluedevil_export.h
+    DESTINATION include/bluedevil
+)
+
+configure_file(${CMAKE_CURRENT_SOURCE_DIR}/bluedevil.pc.in ${CMAKE_CURRENT_BINARY_DIR}/bluedevil.pc @ONLY)
+install(FILES ${CMAKE_CURRENT_BINARY_DIR}/bluedevil.pc DESTINATION ${KDE4_LIB_INSTALL_DIR}/pkgconfig)
diff --git a/bluedevil/libbluedevil/bluedevil/bluedevil_export.h b/bluedevil/libbluedevil/bluedevil/bluedevil_export.h
deleted file mode 100644 (file)
index 6859fe7..0000000
+++ /dev/null
@@ -1,30 +0,0 @@
-/*****************************************************************************
- * This file is part of the BlueDevil project                                *
- *                                                                           *
- * Copyright (C) 2010 Rafael Fernández López <ereslibre@kde.org>             *
- * Copyright (C) 2010 UFO Coders <info@ufocoders.com>                        *
- *                                                                           *
- * This library is free software; you can redistribute it and/or             *
- * modify it under the terms of the GNU Library General Public               *
- * License as published by the Free Software Foundation; either              *
- * version 2 of the License, or (at your option) any later version.          *
- *                                                                           *
- * This library is distributed in the hope that it will be useful,           *
- * but WITHOUT ANY WARRANTY; without even the implied warranty of            *
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU         *
- * Library General Public License for more details.                          *
- *                                                                           *
- * You should have received a copy of the GNU Library General Public License *
- * along with this library; see the file COPYING.LIB.  If not, write to      *
- * the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,      *
- * Boston, MA 02110-1301, USA.                                               *
- *****************************************************************************/
-
-#ifndef BLUEDEVIL_EXPORT_H
-#define BLUEDEVIL_EXPORT_H
-
-#include <QtCore/qglobal.h>
-
-#define BLUEDEVIL_EXPORT Q_DECL_EXPORT
-
-#endif // BLUEDEVIL_EXPORT_H
index 62bc786..67ec367 100644 (file)
@@ -35,6 +35,9 @@ include_directories(
     ${QDBUS_INCLUDE_DIRS}
     ${EXIV2_INCLUDE_DIR}
     ${KDCRAW_INCLUDE_DIR}
+    # for gwenview_export.h
+    ${CMAKE_CURRENT_BINARY_DIR}
+    ${CMAKE_CURRENT_BINARY_DIR}/lib
 )
 
 add_definitions(
index 6b9239a..21e1e98 100644 (file)
@@ -113,6 +113,8 @@ set_target_properties(gwenviewlib PROPERTIES
     SOVERSION ${GENERIC_LIB_SOVERSION}
 )
 
+generate_export_header(gwenviewlib)
+
 target_link_libraries(gwenviewlib
     ${KDE4_KFILE_LIBS}
     ${KDE4_KIO_LIBS}
diff --git a/gwenview/lib/gwenviewlib_export.h b/gwenview/lib/gwenviewlib_export.h
deleted file mode 100644 (file)
index 9498ec8..0000000
+++ /dev/null
@@ -1,36 +0,0 @@
-/*  This file is part of the KDE project
-    Copyright (C) 2006 David Faure <faure@kde.org>
-
-    This library is free software; you can redistribute it and/or
-    modify it under the terms of the GNU Library General Public
-    License as published by the Free Software Foundation; either
-    version 2 of the License, or (at your option) any later version.
-
-    This library is distributed in the hope that it will be useful,
-    but WITHOUT ANY WARRANTY; without even the implied warranty of
-    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
-    Library General Public License for more details.
-
-    You should have received a copy of the GNU Library General Public License
-    along with this library; see the file COPYING.LIB.  If not, write to
-    the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
-    Boston, MA 02110-1301, USA.
-*/
-
-#ifndef GWENVIEWLIB_EXPORT_H
-#define GWENVIEWLIB_EXPORT_H
-
-/* needed for KDE_EXPORT and KDE_IMPORT macros */
-#include <kdemacros.h>
-
-#ifndef GWENVIEWLIB_EXPORT
-# if defined(MAKE_GWENVIEWLIB_LIB)
-/* We are building this library */
-#  define GWENVIEWLIB_EXPORT KDE_EXPORT
-# else
-/* We are using this library */
-#  define GWENVIEWLIB_EXPORT KDE_IMPORT
-# endif
-#endif
-
-#endif
index 4e51c51..891deb2 100644 (file)
@@ -1,5 +1,10 @@
 project(weatherapplet)
 
+include_directories(
+    # for plasmaweather_export.h
+    ${kdeplasma-addons_BINARY_DIR}/libs/plasmaweather
+)
+
 set(weatherapplet_SRCS
     weatherapplet.cpp)
 
index 49a4c1d..45db6f1 100644 (file)
@@ -1,5 +1,10 @@
 project(plasma-weatherstation)
 
+include_directories(
+    # for plasmaweather_export.h
+    ${kdeplasma-addons_BINARY_DIR}/libs/plasmaweather
+)
+
 set(weatherstation_SRCS
     weatherstation.cpp
     lcd.cpp
index 960ab2d..80d5cfa 100644 (file)
@@ -1,5 +1,9 @@
 project(groupingdesktop)
 
+include_directories(
+    ${CMAKE_CURRENT_BINARY_DIR}/lib
+)
+
 add_subdirectory(lib)
 add_subdirectory(desktop)
 add_subdirectory(panel)
index 11abcd4..71600e5 100644 (file)
@@ -26,5 +26,7 @@ set(groupingcontainment_SRCS
 add_library(plasma_groupingcontainment SHARED ${groupingcontainment_SRCS})
 target_link_libraries(plasma_groupingcontainment ${KDE4_PLASMA_LIBS})
 
+generate_export_header(plasma_groupingcontainment)
+
 set_target_properties(plasma_groupingcontainment PROPERTIES VERSION ${GENERIC_LIB_VERSION} SOVERSION ${GENERIC_LIB_SOVERSION})
 install(TARGETS plasma_groupingcontainment EXPORT kdeworkspaceLibraryTargets ${INSTALL_TARGETS_DEFAULT_ARGS})
index 369be00..916f4ae 100644 (file)
@@ -25,7 +25,7 @@
 
 #include "groupinfo.h"
 #include "groupfactory_p.h"
-#include "groupingcontainment_export.h"
+#include "plasma_groupingcontainment_export.h"
 
 class KConfigGroup;
 
index 48e42f6..30883c9 100644 (file)
@@ -22,7 +22,7 @@
 
 #include <Plasma/Containment>
 
-#include "groupingcontainment_export.h"
+#include "plasma_groupingcontainment_export.h"
 
 class AbstractGroup;
 class GroupingContainmentPrivate;
diff --git a/kdeplasma-addons/containments/groupingdesktop/lib/groupingcontainment_export.h b/kdeplasma-addons/containments/groupingdesktop/lib/groupingcontainment_export.h
deleted file mode 100644 (file)
index b8e4304..0000000
+++ /dev/null
@@ -1,40 +0,0 @@
-/*  This file is part of the KDE project
-    Copyright 2007 Aaron Seigo <aseigo@kde.org>
-
-    This library is free software; you can redistribute it and/or
-    modify it under the terms of the GNU Library General Public
-    License as published by the Free Software Foundation; either
-    version 2 of the License, or (at your option) any later version.
-
-    This library is distributed in the hope that it will be useful,
-    but WITHOUT ANY WARRANTY; without even the implied warranty of
-    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
-    Library General Public License for more details.
-
-    You should have received a copy of the GNU Library General Public License
-    along with this library; see the file COPYING.LIB.  If not, write to
-    the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
-    Boston, MA 02110-1301, USA.
-*/
-
-#ifndef GROUPINGCONTAINMENT_EXPORT_H
-#define GROUPINGCONTAINMENT_EXPORT_H
-
-/* needed for KDE_EXPORT and KDE_IMPORT macros */
-#include <kdemacros.h>
-
-#ifndef PLASMA_GROUPINGCONTAINMENT_EXPORT
-# if defined(MAKE_PLASMA_GROUPINGCONTAINMENT_LIB)
-   /* We are building this library */
-#  define PLASMA_GROUPINGCONTAINMENT_EXPORT KDE_EXPORT
-# else
-   /* We are using this library */
-#  define PLASMA_GROUPINGCONTAINMENT_EXPORT KDE_IMPORT
-# endif
-#endif
-
-# ifndef PLASMA_GROUPINGCONTAINMENT_EXPORT_DEPRECATED
-#  define PLASMA_GROUPINGCONTAINMENT_EXPORT_DEPRECATED KDE_DEPRECATED PLASMA_GROUPINGCONTAINMENT_EXPORT
-# endif
-
-#endif
index b967a19..7339dac 100644 (file)
@@ -1,6 +1,6 @@
 set(potd_engine_SRCS
-       cachedprovider.cpp
-       potd.cpp
+    cachedprovider.cpp
+    potd.cpp
 )
 
 kde4_add_plugin(plasma_engine_potd ${potd_engine_SRCS} )
@@ -13,11 +13,13 @@ install(FILES plasma-dataengine-potd.desktop DESTINATION ${KDE4_SERVICES_INSTALL
 ########### plugin core library ############
 
 set(potd_provider_core_SRCS
-       potdprovider.cpp
+    potdprovider.cpp
 )
 
-add_library( plasmapotdprovidercore SHARED ${potd_provider_core_SRCS} )
-target_link_libraries( plasmapotdprovidercore ${KDE4_KDEUI_LIBS} )
+add_library(plasmapotdprovidercore SHARED ${potd_provider_core_SRCS})
+target_link_libraries(plasmapotdprovidercore ${KDE4_KDEUI_LIBS})
+
+generate_export_header(plasmapotdprovidercore BASE_NAME plasma_potd)
 
 install( TARGETS plasmapotdprovidercore ${INSTALL_TARGETS_DEFAULT_ARGS} )
 install( FILES plasma_potdprovider.desktop DESTINATION ${KDE4_SERVICETYPES_INSTALL_DIR} )
diff --git a/kdeplasma-addons/dataengines/potd/plasma_potd_export.h b/kdeplasma-addons/dataengines/potd/plasma_potd_export.h
deleted file mode 100644 (file)
index d850463..0000000
+++ /dev/null
@@ -1,41 +0,0 @@
-/*
- *   Copyright (C) 2007 Tobias Koenig <tokoe@kde.org>
- *
- *   This program is free software; you can redistribute it and/or modify
- *   it under the terms of the GNU General Public License as published by
- *   the Free Software Foundation; either version 2 of the License, or
- *   (at your option) any later version.
- *
- *   This program is distributed in the hope that it will be useful,
- *   but WITHOUT ANY WARRANTY; without even the implied warranty of
- *   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
- *   GNU General Public License for more details
- *
- *   You should have received a copy of the GNU Library General Public
- *   License along with this program; if not, write to the
- *   Free Software Foundation, Inc.,
- *   51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.
- */
-
-#ifndef PLASMA_POTD_EXPORT_H
-#define PLASMA_POTD_EXPORT_H
-
-/* needed for KDE_EXPORT macros */
-#include <kdemacros.h>
-
-#if defined Q_OS_WIN
-#ifndef PLASMA_POTD_EXPORT
-# ifdef MAKE_PLASMAPOTDPROVIDERCORE_LIB
-#  define PLASMA_POTD_EXPORT KDE_EXPORT
-# else
-#  define PLASMA_POTD_EXPORT KDE_IMPORT
-# endif
-#endif
-
-#else /* UNIX*/
-
-/* export statements for unix */
-#define PLASMA_POTD_EXPORT KDE_EXPORT
-#endif
-
-#endif
index 463cca9..7f75fd5 100644 (file)
@@ -12,13 +12,24 @@ set(plasmaweather_HEADERS
     weathervalidator.h
     weatherconfig.h
     weatherlocation.h
-    plasmaweather_export.h
+    ${CMAKE_CURRENT_BINARY_DIR}/plasmaweather_export.h
 )
 
 add_library(plasmaweather SHARED ${plasmaweather_LIB_SRCS})
 
-target_link_libraries(plasmaweather ${KDE4_PLASMA_LIBS} ${KDE4_KDEUI_LIBS} ${KDE4WORKSPACE_WEATHERION_LIBRARY})
-set_target_properties(plasmaweather PROPERTIES VERSION ${GENERIC_LIB_VERSION} SOVERSION ${GENERIC_LIB_SOVERSION})
+target_link_libraries(plasmaweather
+    ${KDE4_PLASMA_LIBS}
+    ${KDE4_KDEUI_LIBS}
+    ${KDE4WORKSPACE_WEATHERION_LIBRARY}
+)
+
+set_target_properties(plasmaweather PROPERTIES
+    VERSION ${GENERIC_LIB_VERSION}
+    SOVERSION ${GENERIC_LIB_SOVERSION}
+)
+
+generate_export_header(plasmaweather)
+
 install(TARGETS plasmaweather ${INSTALL_TARGETS_DEFAULT_ARGS})
 # nothing outside of kdeplasma-addons uses this library, and the API is not stable -> do not install headers!
 #install(FILES ${plasmaweather_HEADERS} DESTINATION ${KDE4_INCLUDE_INSTALL_DIR}/plasmaweather COMPONENT Devel)
diff --git a/kdeplasma-addons/libs/plasmaweather/plasmaweather_export.h b/kdeplasma-addons/libs/plasmaweather/plasmaweather_export.h
deleted file mode 100644 (file)
index 691db23..0000000
+++ /dev/null
@@ -1,40 +0,0 @@
-/*  This file is part of the KDE project
-    Copyright (C) 2007 David Faure <faure@kde.org>
-
-    This library is free software; you can redistribute it and/or
-    modify it under the terms of the GNU Library General Public
-    License as published by the Free Software Foundation; either
-    version 2 of the License, or (at your option) any later version.
-
-    This library is distributed in the hope that it will be useful,
-    but WITHOUT ANY WARRANTY; without even the implied warranty of
-    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
-    Library General Public License for more details.
-
-    You should have received a copy of the GNU Library General Public License
-    along with this library; see the file COPYING.LIB.  If not, write to
-    the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
-    Boston, MA 02110-1301, USA.
-*/
-
-#ifndef PLASMAWEATHER_EXPORT_H
-#define PLASMAWEATHER_EXPORT_H
-
-/* needed for KDE_EXPORT and KDE_IMPORT macros */
-#include <kdemacros.h>
-
-#ifndef PLASMAWEATHER_EXPORT
-# if defined(MAKE_PLASMAWEATHER_LIB)
-   /* We are building this library */ 
-#  define PLASMAWEATHER_EXPORT KDE_EXPORT
-# else
-   /* We are using this library */ 
-#  define PLASMAWEATHER_EXPORT KDE_IMPORT
-# endif
-#endif
-
-# ifndef PLASMAWEATHER_EXPORT_DEPRECATED
-#  define PLASMAWEATHER_EXPORT_DEPRECATED KDE_DEPRECATED PLASMAWEATHER_EXPORT
-# endif
-
-#endif
index 5cd4845..0c24c9c 100644 (file)
@@ -1,5 +1,10 @@
 project(plasma-wallpaper-weather)
 
+include_directories(
+    # for plasmaweather_export.h
+    ${kdeplasma-addons_BINARY_DIR}/libs/plasmaweather
+)
+
 set(weather_SRCS
     weatherwallpaper.cpp
     backgrounddelegate.cpp
index 551e7a0..1ba05da 100644 (file)
@@ -18,7 +18,7 @@
 #include <kdemacros.h>
 
 /* export statements for unix */
-#ifdef MAKE_KGETCORE_LIB
+#ifdef kgetcore_EXPORTS
 # define KGET_EXPORT KDE_EXPORT
 #else
 # define KGET_EXPORT KDE_IMPORT
index 0a85c57..4c9ceee 100644 (file)
@@ -16,10 +16,12 @@ add_subdirectory( pics )
 
 include_directories(
     ${CMAKE_CURRENT_SOURCE_DIR}/komparepart
+    ${CMAKE_CURRENT_BINARY_DIR}/libdialogpages
     ${CMAKE_CURRENT_SOURCE_DIR}/libdialogpages
     ${CMAKE_CURRENT_SOURCE_DIR}/interfaces
     ${CMAKE_CURRENT_SOURCE_DIR}/komparenavtreepart
     ${CMAKE_CURRENT_SOURCE_DIR}/komparepart
+    ${CMAKE_CURRENT_BINARY_DIR}/libkomparediff2
     ${CMAKE_CURRENT_SOURCE_DIR}/libkomparediff2
 )
 
diff --git a/kompare/interfaces/kompareinterfaceexport.h b/kompare/interfaces/kompareinterfaceexport.h
deleted file mode 100644 (file)
index eed5c85..0000000
+++ /dev/null
@@ -1,37 +0,0 @@
-/***************************************************************************
- *   Copyright 2007 Andreas Pakulat <apaku@gmx.de>                         *
- *   Copyright 2006 Matt Rogers <mattr@kde.org>                            *
- *   Copyright 2004 JarosÅ‚aw Staniek <staniek@kde.org>                         *
- *                                                                         *
- *   This program is free software; you can redistribute it and/or modify  *
- *   it under the terms of the GNU Library General Public License as       *
- *   published by the Free Software Foundation; either version 2 of the    *
- *   License, or (at your option) any later version.                       *
- *                                                                         *
- *   This program is distributed in the hope that it will be useful,       *
- *   but WITHOUT ANY WARRANTY; without even the implied warranty of        *
- *   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the         *
- *   GNU General Public License for more details.                          *
- *                                                                         *
- *   You should have received a copy of the GNU Library General Public     *
- *   License along with this program; if not, write to the                 *
- *   Free Software Foundation, Inc.,                                       *
- *   51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.         *
- ***************************************************************************/
-
-#ifndef KOMPAREINTERFACEEXPORT_H
-#define KOMPAREINTERFACEEXPORT_H
-
-/* needed for KDE_EXPORT macros */
-#include <kdemacros.h>
-
-#ifndef DIFF2_EXPORT
-# ifdef MAKE_DIFF2_LIB
-#  define DIFF2_EXPORT KDE_EXPORT
-# else
-#  define DIFF2_EXPORT KDE_IMPORT
-# endif
-#endif
-
-#endif  // KOMPAREINTERFACEEXPORT_H
-
index 7bfde14..e125390 100644 (file)
@@ -1,5 +1,10 @@
 
-include_directories( ${CMAKE_CURRENT_SOURCE_DIR}/../libdiff2 ${CMAKE_CURRENT_SOURCE_DIR}/../komparepart ${CMAKE_CURRENT_SOURCE_DIR}/../libkomparediff2 )
+include_directories(
+    ${CMAKE_CURRENT_SOURCE_DIR}/../libdiff2
+    ${CMAKE_CURRENT_SOURCE_DIR}/../komparepart
+    ${CMAKE_CURRENT_BINARY_DIR}/../libkomparediff2
+    ${CMAKE_CURRENT_SOURCE_DIR}/../libkomparediff2
+)
 
 
 ########### next target ###############
index 3d9314f..ee69804 100644 (file)
@@ -1,5 +1,11 @@
 
-include_directories( ${CMAKE_CURRENT_SOURCE_DIR}/../libdialogpages ${CMAKE_CURRENT_SOURCE_DIR}/../interfaces ${CMAKE_CURRENT_SOURCE_DIR}/../libkomparediff2 )
+include_directories(
+    ${CMAKE_CURRENT_BINARY_DIR}/../libdialogpages
+    ${CMAKE_CURRENT_SOURCE_DIR}/../libdialogpages
+    ${CMAKE_CURRENT_SOURCE_DIR}/../interfaces
+    ${CMAKE_CURRENT_BINARY_DIR}/../libkomparediff2
+    ${CMAKE_CURRENT_SOURCE_DIR}/../libkomparediff2
+)
 
 
 ########### next target ###############
index 551526c..f6b2dca 100644 (file)
@@ -2,22 +2,34 @@
 ########### next target ###############
 
 set(dialogpages_PART_SRCS
-       filessettings.cpp
-       viewsettings.cpp
-       pagebase.cpp
-       diffpage.cpp
-       filespage.cpp
-       viewpage.cpp )
+    filessettings.cpp
+    viewsettings.cpp
+    pagebase.cpp
+    diffpage.cpp
+    filespage.cpp
+    viewpage.cpp
+)
 
 
 add_library(komparedialogpages SHARED ${dialogpages_PART_SRCS})
 
-include_directories( ${CMAKE_CURRENT_SOURCE_DIR}/../libkomparediff2 )
+include_directories(
+    ${CMAKE_CURRENT_BINARY_DIR}/../libkomparediff2
+    ${CMAKE_CURRENT_SOURCE_DIR}/../libkomparediff2
+)
 
-target_link_libraries(komparedialogpages komparediff2 ${KDE4_KDEUI_LIBS} ${KDE4_KIO_LIBS})
+target_link_libraries(komparedialogpages
+    ${KDE4_KDEUI_LIBS}
+    ${KDE4_KIO_LIBS}
+    komparediff2
+)
 
-set_target_properties(komparedialogpages PROPERTIES VERSION ${GENERIC_LIB_VERSION}
-SOVERSION ${GENERIC_LIB_SOVERSION} )
+set_target_properties(komparedialogpages PROPERTIES
+    VERSION ${GENERIC_LIB_VERSION}
+    SOVERSION ${GENERIC_LIB_SOVERSION}
+)
+
+generate_export_header(komparedialogpages)
 
 install(TARGETS komparedialogpages ${INSTALL_TARGETS_DEFAULT_ARGS})
 
diff --git a/kompare/libdialogpages/dialogpagesexport.h b/kompare/libdialogpages/dialogpagesexport.h
deleted file mode 100644 (file)
index b2de57f..0000000
+++ /dev/null
@@ -1,37 +0,0 @@
-/***************************************************************************
- *   Copyright 2007 Andreas Pakulat <apaku@gmx.de>                         *
- *   Copyright 2006 Matt Rogers <mattr@kde.org>                            *
- *   Copyright 2004 JarosÅ‚aw Staniek <staniek@kde.org>                         *
- *                                                                         *
- *   This program is free software; you can redistribute it and/or modify  *
- *   it under the terms of the GNU Library General Public License as       *
- *   published by the Free Software Foundation; either version 2 of the    *
- *   License, or (at your option) any later version.                       *
- *                                                                         *
- *   This program is distributed in the hope that it will be useful,       *
- *   but WITHOUT ANY WARRANTY; without even the implied warranty of        *
- *   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the         *
- *   GNU General Public License for more details.                          *
- *                                                                         *
- *   You should have received a copy of the GNU Library General Public     *
- *   License along with this program; if not, write to the                 *
- *   Free Software Foundation, Inc.,                                       *
- *   51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.         *
- ***************************************************************************/
-
-#ifndef LIBDIALOGPAGESEXPORT_H
-#define LIBDIALOGPAGESEXPORT_H
-
-/* needed for KDE_EXPORT macros */
-#include <kdemacros.h>
-
-#ifndef DIALOGPAGES_EXPORT
-# ifdef MAKE_KOMPAREDIALOGPAGES_LIB
-#  define DIALOGPAGES_EXPORT KDE_EXPORT
-# else
-#  define DIALOGPAGES_EXPORT KDE_IMPORT
-# endif
-#endif
-
-#endif
-
index 92fef04..e1d6a68 100644 (file)
@@ -20,7 +20,7 @@
 #define DIFFPAGE_H
 
 #include "pagebase.h"
-#include "dialogpagesexport.h"
+#include "komparedialogpages_export.h"
 
 #include <QCheckBox>
 #include <QDialog>
@@ -37,7 +37,7 @@ class KUrlRequester;
 
 class DiffSettings;
 
-class DIALOGPAGES_EXPORT DiffPage : public PageBase
+class KOMPAREDIALOGPAGES_EXPORT DiffPage : public PageBase
 {
 Q_OBJECT
 public:
index 84ce981..88f9997 100644 (file)
@@ -20,7 +20,7 @@
 #define FILESPAGE_H
 
 #include "pagebase.h"
-#include "dialogpagesexport.h"
+#include "komparedialogpages_export.h"
 
 #include <QGroupBox>
 
@@ -30,7 +30,7 @@ class KUrlRequester;
 
 class FilesSettings;
 
-class DIALOGPAGES_EXPORT FilesPage : public PageBase
+class KOMPAREDIALOGPAGES_EXPORT FilesPage : public PageBase
 {
 Q_OBJECT
 public:
index dc3306e..22ab4b4 100644 (file)
 
 #include <settingsbase.h>
 
-#include "dialogpagesexport.h"
+#include "komparedialogpages_export.h"
 
 class KConfig;
 
-class DIALOGPAGES_EXPORT FilesSettings : public SettingsBase
+class KOMPAREDIALOGPAGES_EXPORT FilesSettings : public SettingsBase
 {
 Q_OBJECT
 public:
index ac5a923..3dd11f7 100644 (file)
@@ -20,7 +20,7 @@
 #define VIEWPAGE_H
 
 #include "pagebase.h"
-#include "dialogpagesexport.h"
+#include "komparedialogpages_export.h"
 
 #include <QFontComboBox>
 #include <QSpinBox>
@@ -30,7 +30,7 @@ class KTabWidget;
 
 class ViewSettings;
 
-class DIALOGPAGES_EXPORT ViewPage : public PageBase
+class KOMPAREDIALOGPAGES_EXPORT ViewPage : public PageBase
 {
 Q_OBJECT
 public:
index 305e934..0783411 100644 (file)
@@ -24,9 +24,9 @@
 #include <difference.h>
 #include <settingsbase.h>
 
-#include "dialogpagesexport.h"
+#include "komparedialogpages_export.h"
 
-class DIALOGPAGES_EXPORT ViewSettings : public SettingsBase
+class KOMPAREDIALOGPAGES_EXPORT ViewSettings : public SettingsBase
 {
 Q_OBJECT
 public:
index 0c653da..293e8ad 100644 (file)
@@ -23,10 +23,18 @@ set(komparediff2_SRCS
 
 add_library(komparediff2 SHARED ${komparediff2_SRCS})
 
-target_link_libraries(komparediff2 ${KDE4_KDECORE_LIBS} ${KDE4_KDEUI_LIBS} ${KDE4_KIO_LIBS})
+target_link_libraries(komparediff2
+    ${KDE4_KDECORE_LIBS}
+    ${KDE4_KDEUI_LIBS}
+    ${KDE4_KIO_LIBS}
+)
+
+set_target_properties(komparediff2 PROPERTIES
+    VERSION ${GENERIC_LIB_VERSION}
+    SOVERSION ${GENERIC_LIB_SOVERSION}
+)
 
-set_target_properties(komparediff2 PROPERTIES VERSION ${GENERIC_LIB_VERSION}
-SOVERSION ${GENERIC_LIB_SOVERSION} )
+generate_export_header(komparediff2)
 
 install(TARGETS komparediff2 EXPORT LibKompareDiff2Targets ${INSTALL_TARGETS_DEFAULT_ARGS})
 
@@ -34,8 +42,8 @@ if(ENABLE_TESTING)
     add_subdirectory(tests)
 endif()
 
-install(FILES
-    diff2export.h
+install(
+    FILES
     settingsbase.h
     diffsettings.h
     komparemodellist.h
@@ -45,6 +53,7 @@ install(FILES
     marker.h
     kompare.h
     diffhunk.h
+    ${CMAKE_CURRENT_BINARY_DIR}/komparediff2_export.h
     DESTINATION ${KDE4_INCLUDE_INSTALL_DIR}/libkomparediff2  COMPONENT Devel
 )
 
diff --git a/kompare/libkomparediff2/diff2export.h b/kompare/libkomparediff2/diff2export.h
deleted file mode 100644 (file)
index 5551a8d..0000000
+++ /dev/null
@@ -1,37 +0,0 @@
-/***************************************************************************
- *   Copyright 2007 Andreas Pakulat <apaku@gmx.de>                         *
- *   Copyright 2006 Matt Rogers <mattr@kde.org>                            *
- *   Copyright 2004 JarosÅ‚aw Staniek <staniek@kde.org>                         *
- *                                                                         *
- *   This program is free software; you can redistribute it and/or modify  *
- *   it under the terms of the GNU Library General Public License as       *
- *   published by the Free Software Foundation; either version 2 of the    *
- *   License, or (at your option) any later version.                       *
- *                                                                         *
- *   This program is distributed in the hope that it will be useful,       *
- *   but WITHOUT ANY WARRANTY; without even the implied warranty of        *
- *   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the         *
- *   GNU General Public License for more details.                          *
- *                                                                         *
- *   You should have received a copy of the GNU Library General Public     *
- *   License along with this program; if not, write to the                 *
- *   Free Software Foundation, Inc.,                                       *
- *   51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.         *
- ***************************************************************************/
-
-#ifndef LIBDIFF2EXPORT_H
-#define LIBDIFF2EXPORT_H
-
-/* needed for KDE_EXPORT macros */
-#include <kdemacros.h>
-
-#ifndef DIFF2_EXPORT
-# ifdef MAKE_KOMPAREDIFF2_LIB
-#  define DIFF2_EXPORT KDE_EXPORT
-# else
-#  define DIFF2_EXPORT KDE_IMPORT
-# endif
-#endif
-
-#endif
-
index eb45b88..9a97485 100644 (file)
@@ -21,7 +21,7 @@
 #include <qvector.h>
 
 #include <kdebug.h>
-#include "diff2export.h"
+#include "komparediff2_export.h"
 #include "marker.h"
 
 #include <QString>
@@ -29,7 +29,7 @@
 namespace Diff2
 {
 
-class DIFF2_EXPORT DifferenceString
+class KOMPAREDIFF2_EXPORT DifferenceString
 {
 public:
        DifferenceString()
@@ -118,7 +118,7 @@ typedef QVector<DifferenceString*> DifferenceStringList;
 typedef QVector<DifferenceString*>::iterator DifferenceStringListIterator;
 typedef QVector<DifferenceString*>::const_iterator DifferenceStringListConstIterator;
 
-class DIFF2_EXPORT Difference : public QObject
+class KOMPAREDIFF2_EXPORT Difference : public QObject
 {
        Q_OBJECT
 public:
index 45a80ec..f39af77 100644 (file)
@@ -23,7 +23,7 @@
 
 #include "diffhunk.h"
 #include "kompare.h"
-#include "diff2export.h"
+#include "komparediff2_export.h"
 
 namespace Diff2
 {
@@ -31,7 +31,7 @@ namespace Diff2
 class DiffHunk;
 class Difference;
 
-class DIFF2_EXPORT DiffModel : public QObject
+class KOMPAREDIFF2_EXPORT DiffModel : public QObject
 {
        Q_OBJECT
 public:
index edf1d22..7db7b59 100644 (file)
@@ -21,7 +21,7 @@
 #include <QtCore/QList> // include for the base class
 
 #include "diffmodel.h"
-#include "diff2export.h"
+#include "komparediff2_export.h"
 
 namespace Diff2
 {
@@ -29,7 +29,7 @@ namespace Diff2
 typedef QList<DiffModel*>::Iterator DiffModelListIterator;
 typedef QList<DiffModel*>::ConstIterator DiffModelListConstIterator;
 
-class DIFF2_EXPORT DiffModelList : public QList<DiffModel*>
+class KOMPAREDIFF2_EXPORT DiffModelList : public QList<DiffModel*>
 {
 public:
        DiffModelList() {}
index 623c2c8..dcd65cf 100644 (file)
@@ -23,9 +23,9 @@
 
 #include "kompare.h"
 #include "settingsbase.h"
-#include "diff2export.h"
+#include "komparediff2_export.h"
 
-class DIFF2_EXPORT  DiffSettings : public SettingsBase
+class KOMPAREDIFF2_EXPORT  DiffSettings : public SettingsBase
 {
 Q_OBJECT
 public:
index 54aae11..e60a3e7 100644 (file)
@@ -20,7 +20,7 @@
 
 #include <kurl.h>
 
-#include "diff2export.h"
+#include "komparediff2_export.h"
 
 // Forward declaration needed
 class KTempDir;
@@ -142,7 +142,7 @@ namespace Kompare
 /*
 ** This should be removed and put somewhere else
 */
-class DIFF2_EXPORT KompareFunctions
+class KOMPAREDIFF2_EXPORT KompareFunctions
 {
 public:
        static QString constructRelativePath( const QString& from, const QString& to )
index 924097d..c15178c 100644 (file)
@@ -25,7 +25,7 @@
 #include "diffmodel.h"
 #include "diffmodellist.h"
 #include "kompare.h"
-#include "diff2export.h"
+#include "komparediff2_export.h"
 
 
 class KAction;
@@ -38,7 +38,7 @@ class KompareProcess;
 namespace Diff2
 {
 
-class DIFF2_EXPORT KompareModelList : public QObject
+class KOMPAREDIFF2_EXPORT KompareModelList : public QObject
 {
        Q_OBJECT
 public:
index a8b5661..805c5b5 100644 (file)
 #define MARKER_H
 
 #include <QList>
-#include "diff2export.h"
+#include "komparediff2_export.h"
 
 namespace Diff2 {
 
-class DIFF2_EXPORT Marker
+class KOMPAREDIFF2_EXPORT Marker
 {
 public:
     enum Type { Start = 0, End = 1 };
index 3f3cb15..e91b69d 100644 (file)
 #define SETTINGSBASE_H
 
 #include <QtCore/QObject>
+#include <QWidget>
 
 #include "kompare.h"
-#include "diff2export.h"
+#include "komparediff2_export.h"
 
-#include <QWidget>
 class KConfig;
 
-class DIFF2_EXPORT SettingsBase : public QObject
+class KOMPAREDIFF2_EXPORT SettingsBase : public QObject
 {
 Q_OBJECT
 public:
index b5ea9a2..e28979f 100644 (file)
@@ -17,7 +17,6 @@ set(interactiveDiffTest_SRCS
 )
 
 kde4_add_test(kompare-interactiveDiffTest ${interactiveDiffTest_SRCS})
-set_target_properties(kompare-interactiveDiffTest PROPERTIES COMPILE_FLAGS "-DDIFF2_EXPORT=")
 target_link_libraries(kompare-interactiveDiffTest
     ${QT_QTTEST_LIBRARY}
     ${KDE4_KDECORE_LIBS}
@@ -31,7 +30,6 @@ set(levenshteinTest_SRCS
 )
 
 kde4_add_test(kompare-levenshteintest ${levenshteinTest_SRCS})
-set_target_properties(kompare-levenshteintest PROPERTIES COMPILE_FLAGS "-DDIFF2_EXPORT=")
 target_link_libraries(kompare-levenshteintest
     ${QT_QTTEST_LIBRARY}
     ${QT_QTCORE_LIBRARY}
index 34fee1f..35efb1d 100644 (file)
@@ -1,4 +1,3 @@
-
 add_definitions(-DKDE_DEFAULT_DEBUG_AREA=5010)
 
 set(krdccore_SRCS
@@ -13,7 +12,12 @@ add_library(krdccore SHARED ${krdccore_SRCS})
 
 target_link_libraries(krdccore ${KDE4_KDECORE_LIBS} ${KDE4_KDEUI_LIBS})
 
-set_target_properties(krdccore PROPERTIES VERSION ${GENERIC_LIB_VERSION} SOVERSION ${GENERIC_LIB_SOVERSION})
+set_target_properties(krdccore PROPERTIES
+    VERSION ${GENERIC_LIB_VERSION}
+    SOVERSION ${GENERIC_LIB_SOVERSION}
+)
+
+generate_export_header(krdccore)
 
 install(TARGETS krdccore ${INSTALL_TARGETS_DEFAULT_ARGS})
 
diff --git a/krdc/core/krdc_export.h b/krdc/core/krdc_export.h
deleted file mode 100644 (file)
index 5164997..0000000
+++ /dev/null
@@ -1,39 +0,0 @@
-/*  This file is part of the KDE project
-    Copyright (C) 2006 David Faure <faure@kde.org>
-
-    This library is free software; you can redistribute it and/or
-    modify it under the terms of the GNU Library General Public
-    License as published by the Free Software Foundation; either
-    version 2 of the License, or (at your option) any later version.
-
-    This library is distributed in the hope that it will be useful,
-    but WITHOUT ANY WARRANTY; without even the implied warranty of
-    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
-    Library General Public License for more details.
-
-    You should have received a copy of the GNU Library General Public License
-    along with this library; see the file COPYING.LIB.  If not, write to
-    the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
-    Boston, MA 02110-1301, USA.
-*/
-
-#ifndef KRDCCORE_EXPORT_H
-#define KRDCCORE_EXPORT_H
-
-/* needed for KDE_EXPORT and KDE_IMPORT macros */
-#include <kdemacros.h>
-
-#ifndef KRDCCORE_EXPORT
-# if defined(KDELIBS_STATIC_LIBS)
-   /* No export/import for static libraries */
-#  define KRDCCORE_EXPORT
-# elif defined(MAKE_KRDCCORE_LIB)
-   /* We are building this library */
-#  define KRDCCORE_EXPORT KDE_EXPORT
-# else
-   /* We are using this library */
-#  define KRDCCORE_EXPORT KDE_IMPORT
-# endif
-#endif
-
-#endif
index 9492d6c..f91fcba 100644 (file)
@@ -32,7 +32,7 @@
 #else
     #include <KUrl>
     #include <KWallet/Wallet>
-    #include <krdc_export.h>
+    #include "krdccore_export.h"
 #endif
 
 #include <QWidget>
index 6ef8282..da19b91 100644 (file)
@@ -32,19 +32,22 @@ SET(ksane_LIB_SRCS
     options/ksane_opt_slider.cpp
     options/ksane_opt_fslider.cpp
     options/ksane_opt_combo.cpp
-    )
+)
 
 add_library(ksane SHARED ${ksane_LIB_SRCS})
 
-TARGET_LINK_LIBRARIES(ksane ${KDE4_KDEUI_LIBS}
-                            ${SANE_LIBRARY}
-                     )
+TARGET_LINK_LIBRARIES(ksane
+    ${KDE4_KDEUI_LIBS}
+    ${SANE_LIBRARY}
+)
 
 SET_TARGET_PROPERTIES(ksane PROPERTIES
     VERSION ${KSANE_LIB_SO_VERSION_STRING}
     SOVERSION ${KSANE_LIB_SO_CUR_VERSION}
 )
 
+generate_export_header(ksane BASE_NAME libksane)
+
 OPTION(COMPILE_VIEWER_TESTAPP "Compile a small test application for the viewer")
 
 IF (COMPILE_VIEWER_TESTAPP)
@@ -64,7 +67,7 @@ CONFIGURE_FILE(
 INSTALL(
     FILES
     ksane.h
-    libksane_export.h
+    ${CMAKE_CURRENT_BINARY_DIR}/libksane_export.h
     ${CMAKE_CURRENT_BINARY_DIR}/version.h
     DESTINATION ${KDE4_INCLUDE_INSTALL_DIR}/libksane
     COMPONENT Devel
index 2a5245e..5f2eb01 100644 (file)
@@ -114,7 +114,7 @@ public:
     * @return 'true' if all goes well and 'false' if no device is open. */
     bool closeDevice();
     
-    KDE_DEPRECATED bool makeQImage(const QByteArray &, int, int, int, ImageFormat, QImage &);
+    LIBKSANE_DEPRECATED_EXPORT bool makeQImage(const QByteArray &, int, int, int, ImageFormat, QImage &);
      
     /**
      * This is a convenience method that can be used to create a QImage from the image data
diff --git a/libksane/libksane/libksane_export.h b/libksane/libksane/libksane_export.h
deleted file mode 100644 (file)
index a7eb818..0000000
+++ /dev/null
@@ -1,40 +0,0 @@
-/*  This file is part of the KDE project
-    Copyright (C) 2007 David Faure <faure@kde.org>
-
-    This library is free software; you can redistribute it and/or
-    modify it under the terms of the GNU Library General Public
-    License as published by the Free Software Foundation; either
-    version 2 of the License, or (at your option) any later version.
-
-    This library is distributed in the hope that it will be useful,
-    but WITHOUT ANY WARRANTY; without even the implied warranty of
-    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
-    Library General Public License for more details.
-
-    You should have received a copy of the GNU Library General Public License
-    along with this library; see the file COPYING.LIB.  If not, write to
-    the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
-    Boston, MA 02110-1301, USA.
-*/
-
-#ifndef LIBKSANE_EXPORT_H
-#define LIBKSANE_EXPORT_H
-
-/* needed for KDE_EXPORT and KDE_IMPORT macros */
-#include <kdemacros.h>
-
-#ifndef LIBKSANE_EXPORT
-# if defined(MAKE_KSANE_LIB)
-   /* We are building this library */ 
-#  define LIBKSANE_EXPORT KDE_EXPORT
-# else
-   /* We are using this library */ 
-#  define LIBKSANE_EXPORT KDE_IMPORT
-# endif
-#endif
-
-# ifndef LIBKSANE_EXPORT_DEPRECATED
-#  define LIBKSANE_EXPORT_DEPRECATED KDE_DEPRECATED LIBKSANE_EXPORT
-# endif
-
-#endif
index 995155a..d5e3d46 100644 (file)
@@ -24,7 +24,7 @@
 #include <kdemacros.h>
 
 #ifndef KTORRENT_EXPORT
-# if defined(MAKE_KTORRENT_LIB) || defined(MAKE_KGET_BITTORRENTFACTORY_LIB)
+# if defined(ktorrent_EXPORTS) || defined(kget_bittorrentfactory_EXPORTS)
    /* We are building this library */ 
 #  define KTORRENT_EXPORT KDE_EXPORT
 # else
index 1be7a36..2c0aacc 100644 (file)
@@ -141,7 +141,6 @@ install(
     core/form.h
     core/generator.h
     core/global.h
-    core/okular_export.h
     core/page.h
     core/pagesize.h
     core/pagetransition.h
@@ -156,6 +155,7 @@ install(
     core/fileprinter.h
     core/observer.h
     ${CMAKE_CURRENT_BINARY_DIR}/settings_core.h
+    ${CMAKE_CURRENT_BINARY_DIR}/okular_export.h
     DESTINATION ${KDE4_INCLUDE_INSTALL_DIR}/okular/core
     COMPONENT Devel
 )
@@ -181,7 +181,12 @@ target_link_libraries(okularcore
     KDE4::kmediaplayer
 )
 
-set_target_properties(okularcore PROPERTIES VERSION ${GENERIC_LIB_VERSION} SOVERSION ${GENERIC_LIB_SOVERSION})
+set_target_properties(okularcore PROPERTIES
+    VERSION ${GENERIC_LIB_VERSION}
+    SOVERSION ${GENERIC_LIB_SOVERSION}
+)
+
+generate_export_header(okularcore BASE_NAME okular)
 
 install(TARGETS okularcore ${INSTALL_TARGETS_DEFAULT_ARGS} )
 
@@ -254,7 +259,15 @@ qt4_add_dbus_interfaces(okularpart_SRCS ${KDE4_DBUS_INTERFACES_INSTALL_DIR}/org.
 
 kde4_add_plugin(okularpart ${okularpart_SRCS})
 
-target_link_libraries(okularpart okularcore ${KDE4_KPARTS_LIBS} ${KDE4_KPRINTUTILS_LIBS} ${MATH_LIB} ${KDE4_SOLID_LIBS})
+target_link_libraries(okularpart
+    ${KDE4_KPARTS_LIBS}
+    ${KDE4_KPRINTUTILS_LIBS}
+    ${MATH_LIB}
+    ${KDE4_SOLID_LIBS}
+    okularcore
+)
+
+generate_export_header(okularpart)
 
 install(TARGETS okularpart DESTINATION ${KDE4_PLUGIN_INSTALL_DIR})
 
index dfbb441..d7bbe77 100644 (file)
@@ -4,7 +4,7 @@ File=okular.kcfg
 Inherits=SettingsCore
 Mutators=true
 Singleton=true
-Visibility=OKULAR_PART_EXPORT
-IncludeFiles=settings_core.h,okular_part_export.h
+Visibility=OKULARPART_EXPORT
+IncludeFiles=settings_core.h,okularpart_export.h
 SourceIncludeFiles=kstandarddirs.h,qdom.h
 MemberVariables=dpointer
index 67a1a62..ab7695c 100644 (file)
@@ -4,5 +4,5 @@ File=okular_core.kcfg
 Mutators=true
 Singleton=true
 Visibility=OKULAR_EXPORT
-IncludeFiles=core/okular_export.h
+IncludeFiles=okular_export.h
 MemberVariables=dpointer
diff --git a/okular/core/okular_export.h b/okular/core/okular_export.h
deleted file mode 100644 (file)
index d517915..0000000
+++ /dev/null
@@ -1,33 +0,0 @@
-/***************************************************************************
- *   Copyright (C) 2006      by Pino Toscano <toscano.pino@tiscali.it>     *
- *                                                                         *
- *   This program is free software; you can redistribute it and/or modify  *
- *   it under the terms of the GNU General Public License as published by  *
- *   the Free Software Foundation; either version 2 of the License, or     *
- *   (at your option) any later version.                                   *
- ***************************************************************************/
-
-#ifndef OKULAR_EXPORT_H
-#define OKULAR_EXPORT_H
-
-/* needed for KDE_EXPORT macros */
-#include <kdemacros.h>
-
-
-#if defined _WIN32 || defined _WIN64
-#ifndef OKULAR_EXPORT
-# ifdef MAKE_OKULARCORE_LIB
-#  define OKULAR_EXPORT KDE_EXPORT
-# else
-#  define OKULAR_EXPORT KDE_IMPORT
-# endif
-#endif
-
-#else /* UNIX*/
-
-
-/* export statements for unix */
-#define OKULAR_EXPORT KDE_EXPORT
-#endif
-
-#endif
index c5fcea3..59f7b6e 100644 (file)
@@ -178,7 +178,7 @@ class OKULAR_EXPORT TextDocumentGenerator : public Generator, public Okular::Con
          * @note the generator will take ownership of the converter, so you
          *       don't have to delete it yourself
          */
-        KDE_DEPRECATED TextDocumentGenerator( TextDocumentConverter *converter, QObject *parent, const QVariantList &args );
+        OKULAR_DEPRECATED_EXPORT TextDocumentGenerator( TextDocumentConverter *converter, QObject *parent, const QVariantList &args );
         virtual ~TextDocumentGenerator();
 
         // [INHERITED] load a document and fill up the pagesVector
diff --git a/okular/generators/dvi/kviewshell_export.h b/okular/generators/dvi/kviewshell_export.h
deleted file mode 100644 (file)
index 5335608..0000000
+++ /dev/null
@@ -1,17 +0,0 @@
-/***************************************************************************
- *   Copyright (C) 2006 by Luigi Toscano <luigi.toscano@tiscali.it>        *
- *                                                                         *
- *   This program is free software; you can redistribute it and/or modify  *
- *   it under the terms of the GNU General Public License as published by  *
- *   the Free Software Foundation; either version 2 of the License, or     *
- *   (at your option) any later version.                                   *
- ***************************************************************************/
-
-#ifndef _KVIEWSHELL_EXPORT_H_
-#define _KVIEWSHELL_EXPORT_H_
-
-#include <kdemacros.h>
-
-#define KVIEWSHELL_EXPORT
-
-#endif
index b77e2ec..c34cde7 100644 (file)
@@ -10,8 +10,6 @@
 #ifndef PAGESIZE_H
 #define PAGESIZE_H
 
-#include "kviewshell_export.h"
-
 #include "simplePageSize.h"
 
 #include <QObject>
@@ -38,7 +36,7 @@ The main difference to the SimplePageSize class are the following.
 @version 1.0.0
 */
 
-class KVIEWSHELL_EXPORT pageSize : public QObject, public SimplePageSize
+class pageSize : public QObject, public SimplePageSize
 {
 Q_OBJECT
 
index 3388883..9e375c4 100644 (file)
 #ifndef SIMPLEPAGESIZE_H
 #define SIMPLEPAGESIZE_H
 
-#include "kviewshell_export.h"
-
 #include "length.h"
 
 #include <QSize>
-
 #include <QPaintDevice>
 #include <QString>
-
+#include <kdemacros.h>
 
 /** \brief This class represents physical page sizes.
 
index 43b377c..ea54b6c 100644 (file)
@@ -10,7 +10,7 @@
 #ifndef _OKULAR_CONFIGINTERFACE_H_
 #define _OKULAR_CONFIGINTERFACE_H_
 
-#include "../core/okular_export.h"
+#include "okular_export.h"
 
 #include <QtCore/QObject>
 
index dbfd54b..deed9b8 100644 (file)
@@ -10,7 +10,7 @@
 #ifndef _OKULAR_GUIINTERFACE_H_
 #define _OKULAR_GUIINTERFACE_H_
 
-#include "../core/okular_export.h"
+#include "okular_export.h"
 
 #include <QtCore/QObject>
 
index 7c8b4b7..bb28373 100644 (file)
@@ -10,7 +10,7 @@
 #ifndef _OKULAR_PRINTINTERFACE_H_
 #define _OKULAR_PRINTINTERFACE_H_
 
-#include "../core/okular_export.h"
+#include "okular_export.h"
 
 #include <QtCore/QObject>
 
index 21dc3de..851843f 100644 (file)
@@ -10,7 +10,7 @@
 #ifndef _OKULAR_SAVEINTERFACE_H_
 #define _OKULAR_SAVEINTERFACE_H_
 
-#include "../core/okular_export.h"
+#include "okular_export.h"
 
 #include <QtCore/QObject>
 
index c3de2e9..5858986 100644 (file)
@@ -10,7 +10,7 @@
 #ifndef _OKULAR_VIEWERINTERFACE_H_
 #define _OKULAR_VIEWERINTERFACE_H_
 
-#include "../core/okular_export.h"
+#include "okular_export.h"
 
 #include <QtCore/QObject>
 #include <QtCore/QString>
diff --git a/okular/okular_part_export.h b/okular/okular_part_export.h
deleted file mode 100644 (file)
index e478414..0000000
+++ /dev/null
@@ -1,33 +0,0 @@
-/***************************************************************************
- *   Copyright (C) 2013 by Albert Astals Cid <aacid@kde.org>               *
- *                                                                         *
- *   This program is free software; you can redistribute it and/or modify  *
- *   it under the terms of the GNU General Public License as published by  *
- *   the Free Software Foundation; either version 2 of the License, or     *
- *   (at your option) any later version.                                   *
- ***************************************************************************/
-
-#ifndef OKULAR_PART_EXPORT_H
-#define OKULAR_PART_EXPORT_H
-
-/* needed for KDE_EXPORT macros */
-#include <kdemacros.h>
-
-
-#if defined _WIN32 || defined _WIN64
-#ifndef OKULAR_PART_EXPORT
-# ifdef MAKE_OKULARPART_LIB
-#  define OKULAR_PART_EXPORT KDE_EXPORT
-# else
-#  define OKULAR_PART_EXPORT KDE_IMPORT
-# endif
-#endif
-
-#else /* UNIX*/
-
-
-/* export statements for unix */
-#define OKULAR_PART_EXPORT KDE_EXPORT
-#endif
-
-#endif
index 3f1a01c..1324e38 100644 (file)
@@ -28,7 +28,7 @@
 #include "kdocumentviewer.h"
 #include "interfaces/viewerinterface.h"
 
-#include "okular_part_export.h"
+#include "okularpart_export.h"
 
 #include <QtDBus/QtDBus>
 
@@ -94,7 +94,7 @@ enum EmbedMode
  * @author Wilco Greven <greven@kde.org>
  * @version 0.2
  */
-class OKULAR_PART_EXPORT Part : public KParts::ReadWritePart, public Okular::DocumentObserver, public KDocumentViewer, public Okular::ViewerInterface
+class OKULARPART_EXPORT Part : public KParts::ReadWritePart, public Okular::DocumentObserver, public KDocumentViewer, public Okular::ViewerInterface
 {
     Q_OBJECT
     Q_CLASSINFO("D-Bus Interface", "org.kde.okular")
index 597ca92..0686187 100644 (file)
@@ -14,7 +14,7 @@
 #include "core/observer.h"
 #include <QtCore/qabstractitemmodel.h>
 
-#include "okular_part_export.h"
+#include "okularpart_export.h"
 
 #include <QDomNode>
 #include <QModelIndex>
@@ -27,7 +27,7 @@ class Document;
 class PartTest;
 }
 
-class OKULAR_PART_EXPORT TOC : public QWidget, public Okular::DocumentObserver
+class OKULARPART_EXPORT TOC : public QWidget, public Okular::DocumentObserver
 {
 Q_OBJECT
     friend class Okular::PartTest;
index 082f0b6..280fc0b 100644 (file)
@@ -1,4 +1,7 @@
-include_directories(${CMAKE_SOURCE_DIR}/libksane)
+include_directories(
+    ${CMAKE_SOURCE_DIR}/libksane
+    ${CMAKE_BINARY_DIR}/libksane/libksane
+)
 
 set(skanlite_SRCS
     main.cpp